-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: Layer timedistributeddense_1 requires to know the length of its input, but it could not be inferred automatically. #24
Comments
Hi, I have the same error :( |
My output: |
Solution is downgrading keras to version 0.1.0 . :) |
I am setting up my system and currently having the same issue. |
Meybe this will work |
@piteight Thank you, it seems to be working now. I uninstalled keras and re-installed using piteight's solution. Also, I switched Keras's backend from the default TensorFlow to Theano (instructions here: https://keras.io/backend/). |
For those who want to use Keras version 1.1.1 (currently the latest, as of 11/12/16) then you can adopt the changes in my repo: https://github.com/mattpearson/GRUV |
Using TensorFlow backend.
Loading training data
Finished loading training data
/usr/lib/python2.7/dist-packages/keras/layers/core.py:1112: UserWarning: TimeDistributedDense is deprecated, please use TimeDistributed(Dense(...)) instead.
warnings.warn('TimeDistributedDense is deprecated, '
Traceback (most recent call last):
File "train.py", line 27, in
model = network_utils.create_lstm_network(num_frequency_dimensions=freq_space_dims, num_hidden_dimensions=hidden_dims)
File "/home/andrena/Bureau/GRUV-master/nn_utils/network_utils.py", line 8, in create_lstm_network
model.add(TimeDistributedDense(input_dim=num_frequency_dimensions, output_dim=num_hidden_dimensions))
File "/usr/lib/python2.7/dist-packages/keras/models.py", line 276, in add
layer.create_input_layer(batch_input_shape, input_dtype)
File "/usr/lib/python2.7/dist-packages/keras/engine/topology.py", line 370, in create_input_layer
self(x)
File "/usr/lib/python2.7/dist-packages/keras/engine/topology.py", line 514, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/usr/lib/python2.7/dist-packages/keras/engine/topology.py", line 572, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/usr/lib/python2.7/dist-packages/keras/engine/topology.py", line 149, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/usr/lib/python2.7/dist-packages/keras/layers/core.py", line 1185, in call
' requires to know the length of its input, '
Exception: Layer timedistributeddense_1 requires to know the length of its input, but it could not be inferred automatically. Specify it manually by passing an input_shape argument to the first layer in your model.
The text was updated successfully, but these errors were encountered: