Open yogesh-nikose opened 5 years ago
After====> this step python -m basic.cli --mode train --noload --debug i get the above error can some one help me through this
same question for me....
@hhhhlyy @yogesh-nikose I'm encountering this problem as well. Have you solved it?
Traceback (most recent call last): File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1567, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 900 and 300 for 'model_0/prepro/prepro/fw/fw/while/basic_lstm_cell/MatMul_6' (op: 'MatMul') with input shapes: [?,900], [300,400].
During handling of the above exception, another exception occurred:
Traceback
(most recent call last): File "/home/u19872/.conda/envs/bert01/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/u19872/.conda/envs/bert01/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/u19872/bert01/bi-att-flow/basic/cli.py", line 126, in <module> tf.app.run() File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run _sys.exit(main(argv)) File "/home/u19872/bert01/bi-att-flow/basic/cli.py", line 123, in main m(config) File "/home/u19872/bert01/bi-att-flow/basic/main.py", line 23, in main _train(config) File "/home/u19872/bert01/bi-att-flow/basic/main.py", line 82, in _train models = get_multi_gpu_models(config) File "/home/u19872/bert01/bi-att-flow/basic/model.py", line 21, in get_multi_gpu_models model = Model(config, scope, rep=gpu_idx == 0) File "/home/u19872/bert01/bi-att-flow/basic/model.py", line 59, in __init__ self._build_forward() File "/home/u19872/bert01/bi-att-flow/basic/model.py", line 165, in _build_forward (fw_g0, bw_g0), _ = bidirectional_dynamic_rnn(first_cell, first_cell, p0, x_len, dtype='float', scope='g0') # [N, M, JX, 2d] File "/home/u19872/bert01/bi-att-flow/my/tensorflow/rnn.py", line 62, in bidirectional_dynamic_rnn time_major=time_major, scope=scope) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 412, in bidirectional_dynamic_rnn time_major=time_major, scope=fw_scope) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 627, in dynamic_rnn dtype=dtype) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 824, in _dynamic_rnn_loop swap_memory=swap_memory) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3224, in while_loop result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2956, in BuildLoop pred, body, original_loop_vars, loop_vars, shape_invariants) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2893, in _BuildLoop body_result = body(*packed_vars_for_body) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3194, in <lambda> body = lambda i, lv: (i + 1, orig_body(*lv)) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 793, in _time_step skip_conditionals=True) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 248, in _rnn_step new_output, new_state = call_cell() File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py", line 781, in <lambda> call_cell = lambda: cell(input_t, state) File "/home/u19872/bert01/bi-att-flow/my/tensorflow/rnn_cell.py", line 16, in __call__ outputs_do, new_state_do = super(SwitchableDropoutWrapper, self).__call__(inputs, state, scope=scope) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn_cell_impl.py", line 1099, in __call__ output, new_state = self._cell(inputs, state, scope=scope) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn_cell_impl.py", line 339, in __call__ *args, **kwargs) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 717, in __call__ outputs = self.call(inputs, *args, **kwargs) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/rnn_cell_impl.py", line 620, in call array_ops.concat([inputs, h], 1), self._kernel) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 2122, in matmul a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 4279, in mat_mul name=name) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op op_def=op_def) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1734, in __init__ control_input_ops) File "/home/u19872/.conda/envs/bert01/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op raise ValueError(str(e)) ValueError: Dimensions must be equal, but are 900 and 300 for 'model_0/prepro/prepro/fw/fw/while/basic_lstm_cell/MatMul_6' (op: 'MatMul') with input shapes: [?,900], [300,400].``
Why I'm getting Value ERROR please help me through this