Open anand-ar opened 7 years ago
We have a problem with Keras > 2.0.8. Consider using Keras 2.0.6 untill we fix the bug.
switching to 2.06 avoided that issue - now this error has come up
Using TensorFlow backend.
Preparing model...Traceback (most recent call last):
File "predict.py", line 33, in
still using your model
Thanks
That error occurred because QuestionPooling layer was updated in later commits to be consistent with R-Net paper. However the provided model was built with previous implementation. To avoid this error and use the model without errors run the following command
git checkout 715221945416f312c253d88bf9ca2c1debef61d3
and then run the prediction script
Ok, prediction script worked with patch on the complete dataset
Then I wanted to just check one topic - super_bowl_50 - cut the input to just have super_bowl_50 passage and questions - parsed and preprocessed - looks like some keras compatibility issue or your implementation requires complete data set
prediction script had this error
Preparing model...Done!
Loading data...Done!
Running predicting model...Traceback (most recent call last):
File "predict.py", line 54, in
Have you included char-level-embeddings while parsing? As far as I understand the model that you are trying to run requires them (vectors + embeddings => 4 arrays)
I used your trained model and ran predict script after following 2 steps:
But I am getting following error:
File "predict.py", line 54, in
What needs to be done.
Thanks
@shwetgarg - had the same set of errors. Were you able to solve the last error? Thanks
@shwetgarg I am also getting the same error. Could you resolve the issue?
I have similar error with Keras 2.3.1.
I have similar error with Keras 2.3.1.
+1
Hi I ran a code for my dataset that I was able to learn several times. Now I want to learn it again. It gives the following error if I have not changed the code.
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:805 train_function * return step_function(self, iterator) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:795 step_function * outputs = model.distribute_strategy.run(run_step, args=(data,)) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1259 run return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2730 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:3417 _call_for_each_replica return fn(args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:788 run_step outputs = model.train_step(data) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:754 train_step y_pred = self(x, training=True) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py:998 call input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_spec.py:207 assert_input_compatibility ' input tensors. Inputs received: ' + str(inputs))
ValueError: Layer model expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None, None, None) dtype=uint8>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None, None) dtype=float32>]
Can you guide me?
Hi I ran a code for my dataset that I was able to learn several times. Now I want to learn it again. It gives the following error if I have not changed the code.
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:805 train_function * return step_function(self, iterator) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:795 step_function * outputs = model.distribute_strategy.run(run_step, args=(data,)) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1259 run return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2730 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:3417 _call_for_each_replica return fn(args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:788 run_step outputs = model.train_step(data) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:754 train_step y_pred = self(x, training=True) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py:998 call input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_spec.py:207 assert_input_compatibility ' input tensors. Inputs received: ' + str(inputs))
ValueError: Layer model expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None, None, None) dtype=uint8>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None, None) dtype=float32>]
Can you guide me?
@sarahosini i'm havinf the same problem. did you get it resolved?
Hi I ran a code for my dataset that I was able to learn several times. Now I want to learn it again. It gives the following error if I have not changed the code.
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:805 train_function * return step_function(self, iterator) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:795 step_function * outputs = model.distribute_strategy.run(run_step, args=(data,)) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1259 run return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2730 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:3417 _call_for_each_replica return fn(args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:788 run_step outputs = model.train_step(data) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:754 train_step y_pred = self(x, training=True) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py:998 call input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_spec.py:207 assert_input_compatibility ' input tensors. Inputs received: ' + str(inputs))
ValueError: Layer model expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None, None, None) dtype=uint8>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None, None) dtype=float32>]
Can you guide me?
@sarahosini, I am facing the same issue! any solution found for this error!
Hi I ran a code for my dataset that I was able to learn several times. Now I want to learn it again. It gives the following error if I have not changed the code. /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:805 train_function * return step_function(self, iterator) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:795 step_function * outputs = model.distribute_strategy.run(run_step, args=(data,)) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1259 run return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2730 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:3417 _call_for_each_replica return fn(args, kwargs) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:788 run_step outputs = model.train_step(data) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:754 train_step y_pred = self(x, training=True) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py:998 call input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) /usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_spec.py:207 assert_input_compatibility ' input tensors. Inputs received: ' + str(inputs))
ValueError: Layer model expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None, None, None) dtype=uint8>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None, None) dtype=float32>]
Can you guide me?
@sarahosini, I am facing the same issue! any solution found for this error!
@sarahosini, I am also getting the same error. Has any solution been found for this!
Hi,
I used your trained model and ran predict script - I get the the above errror
ValueError: Layer question_attn_gru_1 expects 2 inputs, but it received 7 input tensors. Input received: [<tf.Tensor 'uP/cond/Merge:0' shape=(?, ?, 90) dtype=float32>, <tf.Tensor 'uQ/cond/Merge:0' shape=(?, ?, 90) dtype=float32>, <tf.Tensor 'mul:0' shape=(90, 45) dtype=float32>, <tf.Tensor 'mul_1:0' shape=(45, 45) dtype=float32>, <tf.Tensor 'mul_2:0' shape=(90, 45) dtype=float32>, <tf.Tensor 'mul_3:0' shape=(45, 1) dtype=float32>, <tf.Tensor 'mul_4:0' shape=(180, 180) dtype=float32>]
what needs to be done
Thanks