D:\python3.6-64\python.exe C:/Users/Notebook/Chinese-novel-generation/test.py
WARNING:tensorflow:From D:\python3.6-64\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
Traceback (most recent call last):
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 686, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 512 and 556 for 'rnn/while/rnn/multi_rnn_cell/cell_0/basic_lstm_cell/MatMul_1' (op: 'MatMul') with input shapes: [?,512], [556,1024].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Notebook/Chinese-novel-generation/test.py", line 214, in
logits, final_state = build_nn(cell, rnn_size, input_text, vocab_size, embed_dim)
File "C:/Users/Notebook/Chinese-novel-generation/test.py", line 149, in build_nn
outputs, final_state = build_rnn(cell, embed)
File "C:/Users/Notebook/Chinese-novel-generation/test.py", line 136, in build_rnn
outputs, final_state = tf.nn.dynamic_rnn(cell, inputs, dtype=tf.float32)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn.py", line 635, in dynamic_rnn
dtype=dtype)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn.py", line 832, in _dynamic_rnn_loop
swap_memory=swap_memory)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3202, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2940, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2877, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3178, in
body = lambda i, lv: (i + 1, orig_body(*lv))
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn.py", line 803, in _time_step
(output, new_state) = call_cell()
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn.py", line 789, in
call_cell = lambda: cell(input_t, state)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 191, in call
return super(RNNCell, self).call(inputs, state)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\layers\base.py", line 714, in call
outputs = self.call(inputs, *args, **kwargs)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 1242, in call
cur_inp, new_state = cell(cur_inp, cur_state)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 1058, in call
output, new_state = self._cell(inputs, state, scope=scope)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 298, in call
*args, **kwargs)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\layers\base.py", line 714, in call
outputs = self.call(inputs, *args, **kwargs)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 579, in call
array_ops.concat([inputs, h], 1), self._kernel)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\math_ops.py", line 2108, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 4492, in mat_mul
name=name)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\ops.py", line 3292, in create_op
compute_device=compute_device)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\ops.py", line 3332, in _create_op_helper
set_shapes_for_outputs(op)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\ops.py", line 2496, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\ops.py", line 2469, in _set_shapes_for_outputs
shapes = shape_func(op)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\ops.py", line 2399, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "D:\python3.6-64\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimensions must be equal, but are 512 and 556 for 'rnn/while/rnn/multi_rnn_cell/cell_0/basic_lstm_cell/MatMul_1' (op: 'MatMul') with input shapes: [?,512], [556,1024].