ChihebTrabelsi / deep_complex_networks

Implementation related to the Deep Complex Networks
MIT License
715 stars 280 forks source link

ValueError in complex_shallow_convnet #17

Open OisinMoran opened 6 years ago

OisinMoran commented 6 years ago

In trying to run through the README, I encounter this error when trying to run the first complex model with scripts/train.py shallow__complex_model --in-memory --model=complex_shallow_convnet --complex --local-data data/musicnet_11khz.npz and am unsure of how to fix it.

Traceback (most recent call last):
  File "scripts/train.py", line 148, in <module>
    main(**parser.parse_args().__dict__)
  File "scripts/train.py", line 106, in main
    model = get_model(model, dataset.feature_dim)
  File "scripts/train.py", line 79, in get_model
    channels=feature_dim[1])
  File "/home/oisin/deep_complex_networks/musicnet/musicnet/models/complex/__init__.py", line 31, in get_shallow_convnet
    activation='relu')(inputs)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py", line 587, in __call__
    self.assert_input_compatibility(inputs)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py", line 497, in assert_input_compatibility
    ' but got shape ' + str(x_shape))
ValueError: Input 0 is incompatible with layer complex_conv1d_1: expected axis -1 of input shape to have value 0 but got shape (None, 4096, 1)

Any help would be greatly appreciated!

yannan123 commented 6 years ago

Hello, Have you solved the problem? The same error occurred to me. How did you solve it?

OisinMoran commented 6 years ago

@yannan123 Hello! Unfortunately no, I was not able to solve this issue.