提交 c2f4a205 authored 作者: Taesup (TS) Kim's avatar Taesup (TS) Kim

Minor modifications

上级 4a6512b1
...@@ -688,18 +688,17 @@ class TestBilinearUpsampling(unittest.TestCase): ...@@ -688,18 +688,17 @@ class TestBilinearUpsampling(unittest.TestCase):
utt.assert_allclose(f(), up_mat_2d, rtol=1e-06) utt.assert_allclose(f(), up_mat_2d, rtol=1e-06)
def test_bilinear_upsampling_reshaping(self): def test_bilinear_upsampling_reshaping(self):
"""Test bilinear upsampling without giving shape information # Test bilinear upsampling without giving shape information
# This method tests the bilinear_upsampling method
This method tests the bilinear_upsampling method # without giving batch_size and num_input_channels
without giving batch_size and num_input_channels
"""
# upsampling for a ratio of two # upsampling for a ratio of two
input_x = np.array([[[[1, 2], [3, 4]]]], dtype=theano.config.floatX) input_x = np.array([[[[1, 2], [3, 4]]]], dtype=theano.config.floatX)
for ratio in [2, 3]: for ratio in [2, 3]:
for use_1D_kernel in [True, False]: for use_1D_kernel in [True, False]:
bilin_mat = bilinear_upsampling(input=input_x, ratio=ratio, bilin_mat = bilinear_upsampling(input=input_x, ratio=ratio,
batch_size=None,
num_input_channels=None,
use_1D_kernel=use_1D_kernel) use_1D_kernel=use_1D_kernel)
f = theano.function([], bilin_mat, mode=self.compile_mode) f = theano.function([], bilin_mat, mode=self.compile_mode)
up_mat_2d = self.get_upsampled_twobytwo_mat(input_x, ratio) up_mat_2d = self.get_upsampled_twobytwo_mat(input_x, ratio)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论