dynamic-coattention-network-plus icon indicating copy to clipboard operation
dynamic-coattention-network-plus copied to clipboard

while running $ python main.py --embedding_size 100, facing a valueerror- ValueError: memory_sequence_length and memory_mask can't be provided at same time.

Open niteshjindal-7 opened this issue 5 years ago • 0 comments

(myenv) [root@cernindopsan00 question_answering]# python main.py --embedding_size 100 WARNING: Logging before flag parsing goes to stderr. W0517 01:10:22.478212 140002439886656 init.py:329] Limited tf.compat.v2.summary API due to missing TensorBoard installation. W0517 01:10:23.347625 140002439886656 module_wrapper.py:139] From main.py:444: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

I0517 01:10:27.553074 140002439886656 main.py:414] Train/Dev size 81884/4326 W0517 01:10:28.167428 140002439886656 module_wrapper.py:139] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_model.py:26: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0517 01:10:28.171047 140002439886656 module_wrapper.py:139] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_model.py:34: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

W0517 01:10:28.455736 140002439886656 lazy_loader.py:50] The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

  • https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  • https://github.com/tensorflow/addons
  • https://github.com/tensorflow/io (for I/O related ops) If you depend on functionality not listed there, please file an issue.

W0517 01:10:28.455920 140002439886656 deprecation.py:323] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/modules.py:140: LSTMCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. Instructions for updating: This class is equivalent as tf.keras.layers.LSTMCell, and will be replaced by that in Tensorflow 2.0. W0517 01:10:28.464773 140002439886656 deprecation.py:323] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py:239: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API W0517 01:10:28.465013 140002439886656 deprecation.py:323] From /var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/ops/rnn.py:464: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API W0517 01:10:28.525195 140002439886656 deprecation.py:323] From /var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/ops/rnn_cell_impl.py:958: Layer.add_variable (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version. Instructions for updating: Please use layer.add_weight method instead. W0517 01:10:28.531512 140002439886656 deprecation.py:506] From /var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/ops/rnn_cell_impl.py:962: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor W0517 01:10:28.559583 140002439886656 deprecation.py:323] From /var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/ops/rnn.py:244: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where W0517 01:10:28.880152 140002439886656 deprecation.py:323] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py:178: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.Dense instead. W0517 01:10:28.880538 140002439886656 deprecation.py:323] From /var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/layers/core.py:187: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version. Instructions for updating: Please use layer.__call__ method instead. W0517 01:10:28.906630 140002439886656 module_wrapper.py:139] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py:278: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W0517 01:10:29.831586 140002439886656 deprecation.py:506] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_model.py:66: 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. W0517 01:10:29.841133 140002439886656 module_wrapper.py:139] From /home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py:376: The name tf.AUTO_REUSE is deprecated. Please use tf.compat.v1.AUTO_REUSE instead.

Traceback (most recent call last): File "main.py", line 444, in tf.app.run() File "/var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/var/anaconda3/envs/myenv/lib/python3.7/site-packages/absl/app.py", line 300, in run _run_main(main, args) File "/var/anaconda3/envs/myenv/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "main.py", line 422, in main model = DCN(embeddings, FLAGS.flag_values_dict()) File "/home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_model.py", line 83, in init logits = dcn_decode(encoding, self.paragraph_length, hparams['state_size'], hparams['pool_size'], hparams['max_iter'], keep_prob=maybe_dropout(hparams['keep_prob'], self.is_training)) File "/home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py", line 405, in dcn_decode logit = decoder_body(encoding, output, answer, state_size, pool_size, document_length, keep_prob) File "/home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py", line 485, in decoder_body alpha = highway_maxout_network(answer) File "/home/nitesh_jobaide/dynamic-coattention-network-plus-master/dynamic-coattention-network-plus-master/question_answering/networks/dcn_plus.py", line 481, in highway_maxout_network logit = _maybe_mask_score(logit, document_length, -1e30) #-1e30 File "/var/anaconda3/envs/myenv/lib/python3.7/site-packages/tensorflow_core/contrib/seq2seq/python/ops/attention_wrapper.py", line 2069, in _maybe_mask_score raise ValueError("memory_sequence_length and memory_mask can't be provided " ValueError: memory_sequence_length and memory_mask can't be provided at same time.

niteshjindal-7 avatar May 17 '20 06:05 niteshjindal-7