nn-transfer
nn-transfer copied to clipboard
Error in nn_transfer.test.test_layers.TestLayers
Install torch,torchvision,tensorflow in virtualenv. with python setup.py test I get below error
ERROR: test_batch_normalization (nn_transfer.test.test_layers.TestLayers)
Traceback (most recent call last):
File "/Users//nn-transfer/nn_transfer/test/test_layers.py", line 87, in test_batch_normalization
keras_model, pytorch_model, self.test_data, 1e-3)
File "/Users//nn-transfer/nn_transfer/test/helpers.py", line 36, in assertEqualPrediction
pytorch_prediction = pytorch_model(test_data_tensor).data.numpy()
File "/Users//nn-transfer/env2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(input, ********kwargs)
File "/Users//nn-transfer/nn_transfer/test/test_layers.py", line 22, in forward
return self.bn(x)
File "/Users//nn-transfer/env2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(input, ********kwargs)
File "/Users//nn-transfer/env2/lib/python2.7/site-packages/torch/nn/modules/batchnorm.py", line 45, in forward
self._check_input_dim(input)
File "/Users/****/nn-transfer/env2/lib/python2.7/site-packages/torch/nn/modules/batchnorm.py", line 264, in _check_input_dim
.format(input.dim()))
ValueError: expected 5D input (got 4D input)
-------------------- >> begin captured logging << --------------------
tensorflow: Level 1: Created variable bn_1/moving_mean/biased:0 with shape