Test_batch_normalization error
Closed this issue · 1 comments
pearlescence-m commented
Hello! Thank you for sharing this amazing library. At the installation, I'm having the following type of the error:
ERROR: test_batch_normalization (nn_transfer.test.test_layers.TestLayers)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/eorg/NeuralNetworks/Meruyert/nn-transfer/nn_transfer/test/test_layers.py", line 87, in test_batch_normalization
keras_model, pytorch_model, self.test_data, 1e-3)
File "/home/eorg/NeuralNetworks/Meruyert/nn-transfer/nn_transfer/test/helpers.py", line 31, in assertEqualPrediction
pytorch_prediction = pytorch_model(test_data_tensor).data.numpy()
File "/home/eorg/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 206, in __call__
result = self.forward(*input, **kwargs)
File "/home/eorg/NeuralNetworks/Meruyert/nn-transfer/nn_transfer/test/test_layers.py", line 22, in forward
return self.bn(x)
File "/home/eorg/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 206, in __call__
result = self.forward(*input, **kwargs)
File "/home/eorg/.local/lib/python2.7/site-packages/torch/nn/modules/batchnorm.py", line 40, in forward
self._check_input_dim(input)
File "/home/eorg/.local/lib/python2.7/site-packages/torch/nn/modules/batchnorm.py", line 173, in _check_input_dim
.format(input.dim()))
ValueError: expected 5D input (got 4D input)
----------------------------------------------------------------------
Ran 12 tests in 40.433s
FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=12 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=12 errors=1 failures=0>
gzuidhof commented
I was not able to reproduce this, sorry for the late response. Could you try again using the latest version of PyTorch and Keras?