Open YvesHarrison opened 6 years ago
I am also having this issue. @YvesHarrison were you able to make any progress? @mahnerak @MartinXPN are you aware of a solution?
Are you sure the dev_data_str.pkl
is result of this command from the instruction?
python preprocessing.py data/dev_parsed.json --outfile data/dev_data_str.pkl --include_str
@mahnerak Yes, I just ran it again to double check. I'm running Theano==1.0.0 and Keras==2.0.6, are those appropriate versions?
I printed the input shape right before the assertion, and got this: [(None, None, 90), (90, 45), (90, 45), (45, 1)]
i'm very new in this field. can you help me solve the Assertion Error problem. i ran the code keras = 2.0.6 , python = 2.7 version. But i got an issue:
Using TensorFlow backend.
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1192: calling reduce_sum_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1192: calling reduce_sum_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1315: calling reduce_any_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1315: calling reduce_any_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:2878: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate
instead of keep_prob
. Rate should be set to rate = 1 - keep_prob
.
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:2878: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate
instead of keep_prob
. Rate should be set to rate = 1 - keep_prob
.
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1210: calling reduce_prod_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1210: calling reduce_prod_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1156: calling reduce_max_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /media/administrator/D/Rnet/rnetenv/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py:1156: calling reduce_max_v1 (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
Preparing model...Traceback (most recent call last):
File "predict.py", line 33, in
I used this command to predict: python predict.py --batch_size 100 --dev_data data/dev_data_str.pkl models/31-t3.05458271443-v3.27696280528.model prediction.json But I came across an assertion problem: Preparing model...Traceback (most recent call last): File "predict.py", line 33, in
model = load_model(args.model, custom_objects())
File "build/bdist.linux-x86_64/egg/keras/models.py", line 233, in load_model
File "build/bdist.linux-x86_64/egg/keras/models.py", line 307, in model_from_config
File "build/bdist.linux-x86_64/egg/keras/layers/init.py", line 54, in deserialize
File "build/bdist.linux-x86_64/egg/keras/utils/generic_utils.py", line 139, in deserialize_keras_object
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 2450, in from_config
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 2447, in process_layer
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 571, in call
File "/home/lxz/nlpProject/R-NET-in-Keras/layers/QuestionPooling.py", line 26, in build
assert(isinstance(input_shape, list) and len(input_shape) == 5)
AssertionError
What should I do to fix it?