Traceback (most recent call last):


 "train.py", line 334, in <module>

main()


 "train.py", line 119, in main

epoch=epoch)


 "train.py", line 182, in train

scores, _ = pack_padded_sequence(scores, decode_lengths, batch_first=True)
ValueError: too many values to unpack (expected 2)

> Traceback (most recent call last):


 "gpt2_generate_main.py", line 210, in <module>

tf.app.run()


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run

_sys.exit(main(argv))


 "gpt2_generate_main.py", line 144, in main

mode=tf.estimator.ModeKeys.PREDICT)


 "/home1/deepak/RaviTej/texar/texar/module_base.py", line 116, in __call__

return self._template(*args, **kwargs)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/template.py", line 455, in __call__

result = self._call_func(args, kwargs)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/template.py", line 406, in _call_func

result = self._func(*args, **kwargs)


 "/home1/deepak/RaviTej/texar/texar/modules/decoders/transformer_decoders.py", line 569, in _build

scope=self.variable_scope)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/contrib/seq2seq/python/ops/decoder.py", line 309, in dynamic_decode

swap_memory=swap_memory)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3202, in while_loop

result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2940, in BuildLoop

pred, body, original_loop_vars, loop_vars, shape_invariants)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2914, in _BuildLoop

next_vars.append(_AddNextAndBackEdge(m, v))


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 688, in _AddNextAndBackEdge

_EnforceShapeInvariant(m, v)


 "/home1/deepak/anaconda/envs/nlp_proj/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 632, in _EnforceShapeInvariant

(merge_var.name, m_shape, n_shape))
ValueError: The shape for transformer_decoder_1/transformer_decoder/while/Merge_27:0 is not an invariant for the loop. It enters the loop with shape (1, 768), but has shape (?, 768) after one iteration. Provide shape invariants using either the `shape_invariants` argument of tf.while_loop or set_shape() on the loop variables.
