tdeboissiere / DeepLearningImplementations

Implementation of recent Deep Learning papers
MIT License
1.81k stars 650 forks source link

Error when running run_cifar10: th backend: shape of the input to "Flatten" is not fully defined #4

Closed IanQS closed 7 years ago

IanQS commented 7 years ago

Using Theano backend. Traceback (most recent call last): File "run_cifar10.py", line 44, in weight_decay=weight_decay) File "/home/ian/Desktop/contrib/test/DeepLearningImplementations/DenseRecNet/denserecnet.py", line 127, in DenseNet x_RNN = Flatten()(x_RNN) File "/home/ian/.virtualenvs/contrib/lib/python3.5/site-packages/keras/engine/topology.py", line 514, in call self.add_inbound_node(inbound_layers, node_indices, tensor_indices) File "/home/ian/.virtualenvs/contrib/lib/python3.5/site-packages/keras/engine/topology.py", line 572, in add_inbound_node Node.create_node(self, inbound_layers, node_indices, tensor_indices) File "/home/ian/.virtualenvs/contrib/lib/python3.5/site-packages/keras/engine/topology.py", line 152, in create_node output_shapes = to_list(outbound_layer.get_output_shape_for(input_shapes[0])) File "/home/ian/.virtualenvs/contrib/lib/python3.5/site-packages/keras/layers/core.py", line 402, in get_output_shape_for '(got ' + str(input_shape[1:]) + '. ' Exception: The shape of the input to "Flatten" is not fully defined (got (0, 8, 1). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.

tdeboissiere commented 7 years ago

DenseRecNet is still a WIP, this is probably caused by the GAP layer (which already flattens the output).

Will modify asap.

Edit: Done