提交 aefab959 authored 作者: Tegan Maharaj's avatar Tegan Maharaj

started setting up class and methods for testing abstract conv as compared to…

started setting up class and methods for testing abstract conv as compared to t.nnet fwd conv outputs
上级 f3844589
......@@ -33,6 +33,9 @@ from theano.tensor.nnet.ConvGrad3D import ConvGrad3D
from theano.tensor.nnet.ConvTransp3D import ConvTransp3D
def conv2d_corr(inputs, filters, border_mode="valid",
subsample=(1, 1), conv_mode='conv',
filter_dilation=(1, 1)):
......@@ -1586,3 +1589,30 @@ class TestConv2dTranspose(unittest.TestCase):
[2, 2, 4, 4, 4, 4, 4, 4, 2, 2],
[2, 2, 4, 4, 4, 4, 4, 4, 2, 2]]]] * 2)
numpy.testing.assert_equal(output, expected_output)
#TM copying the TestConvTypes setup, maybe doing it wrong
class TestConv2dGrads(unittest.TestCase):
def setUp(self):
#TM anything to go here?
def get_outputs_of_conv2d_grad_wrt_inputs
def test_conv2d_grad_wrt_inputs():
"""Compares calculated abstract grads wrt inputs with the fwd grads
This method checks the outputs of conv2_grad_wrt_inputs against
the outputs of T.nnet.conv forward grads to make sure the
results are the same.
"""
def test_conv2d_grad_wrt_weights():
"""Compares calculated abstract grads wrt weights with the fwd grads
This method checks the outputs of conv2_grad_wrt_weights against
the outputs of T.nnet.conv forward grads to make sure the
results are the same.
"""
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论