提交 75981448 authored 作者: Li Yao's avatar Li Yao

minor change

上级 92b16a0a
import unittest import unittest
import __builtin__ import __builtin__
import numpy import numpy
import theano
import theano.tensor as tensor import theano.tensor as tensor
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
from theano.tensor.signal.downsample import (DownsampleFactorMax, max_pool_2d, from theano.tensor.signal.downsample import (DownsampleFactorMax, max_pool_2d,
...@@ -467,12 +468,12 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -467,12 +468,12 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
test_input_array = numpy.array([[[ test_input_array = numpy.array([[[
[1., 2., 3., 4.], [1., 2., 3., 4.],
[5., 6., 7., 8.] [5., 6., 7., 8.]
]]]) ]]]).astype(theano.config.floatX)
test_answer_array = numpy.array([[[ test_answer_array = numpy.array([[[
[0., 0., 0., 0.], [0., 0., 0., 0.],
[0., 6., 0., 8.] [0., 6., 0., 8.]
]]]) ]]]).astype(theano.config.floatX)
input = tensor.dtensor4(name='input') input = tensor.tensor4(name='input')
patch_size = (2, 2) patch_size = (2, 2)
op = max_pool_2d_same_size(input, patch_size) op = max_pool_2d_same_size(input, patch_size)
op_output = function([input], op)(test_input_array) op_output = function([input], op)(test_input_array)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论