Using TensorFlow backend.
WARNING:tensorflow:From /home/hjkim/.conda/envs/hjkim/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:64: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
Traceback (most recent call last):
File "lstm.py", line 51, in <module>
model = lstm()
File "lstm.py", line 22, in lstm
model.add(Bidirectional(LSTM(400, input_shape = (None, ), return_sequences = True)))
File "/home/hjkim/.conda/envs/hjkim/lib/python3.7/site-packages/keras/models.py", line 451, in add
raise ValueError('The first layer in a '
ValueError: The first layer in a Sequential model must get an `input_shape` or `batch_input_shape` argument.
这是我所拥有的脚本,我知道最后一句话是错误。 但是,我认为我已经正确设置了input_shape。
实际上,它在keras版本2.3.1上运行良好,但由于其他ValueError问题,我将其降级为2.1.2。
我想解决这个问题,但我不能自己解决..请有人帮助我。让我知道我错过了什么。