Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

InvalidArgumentError in evaluation #102

Closed
rihardsk opened this issue Mar 23, 2017 · 1 comment
Closed

InvalidArgumentError in evaluation #102

rihardsk opened this issue Mar 23, 2017 · 1 comment

Comments

@rihardsk
Copy link

I am trying to run the nmt_large.yml experiment with my own data. I have also included train_seq2seq.yml and text_metrics_bpe.yml. Basically everything is according to the NMT tutorial.

When training gets to evaluation, it crashes with:

InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 6553600 values, but the requested shape has 0
         [[Node: model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"](model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/transpose, model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/stack)]]
         [[Node: mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2/_429 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_426_mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Here's the full stack trace and some logs before that:

INFO:tensorflow:global_step/sec: 1.41102
INFO:tensorflow:loss = 6.79511, step = 901 (70.871 sec)
INFO:tensorflow:tokens/sec: 8544.36
INFO:tensorflow:Creating AttentionSeq2Seq in mode=eval
INFO:tensorflow:
AttentionSeq2Seq:
  !!python/unicode 'attention.class': !!python/unicode 'seq2seq.decoders.attention.AttentionLayerBahdanau'
  !!python/unicode 'attention.params': {num_units: 512}
  !!python/unicode 'bridge.class': !!python/unicode 'seq2seq.models.bridges.ZeroBridge'
  !!python/unicode 'bridge.params': {}
  !!python/unicode 'decoder.class': !!python/unicode 'seq2seq.decoders.AttentionDecoder'
  !!python/unicode 'decoder.params':
    rnn_cell:
      cell_class: LSTMCell
      cell_params: {num_units: 512}
      dropout_input_keep_prob: 0.8
      dropout_output_keep_prob: 1.0
      num_layers: 4
  !!python/unicode 'embedding.dim': 512
  !!python/unicode 'embedding.share': false
  !!python/unicode 'encoder.class': !!python/unicode 'seq2seq.encoders.BidirectionalRNNEncoder'
  !!python/unicode 'encoder.params':
    rnn_cell:
      cell_class: LSTMCell
      cell_params: {num_units: 512}
      dropout_input_keep_prob: 0.8
      dropout_output_keep_prob: 1.0
      num_layers: 2
  !!python/unicode 'inference.beam_search.beam_width': 0
  !!python/unicode 'inference.beam_search.choose_successors_fn': !!python/unicode 'choose_top_k'
  !!python/unicode 'inference.beam_search.length_penalty_weight': 0.0
  !!python/unicode 'optimizer.clip_gradients': 5.0
  !!python/unicode 'optimizer.learning_rate': 0.0001
  !!python/unicode 'optimizer.lr_decay_rate': 0.99
  !!python/unicode 'optimizer.lr_decay_steps': 100
  !!python/unicode 'optimizer.lr_decay_type': !!python/unicode ''
  !!python/unicode 'optimizer.lr_min_learning_rate': 1.0e-12
  !!python/unicode 'optimizer.lr_staircase': false
  !!python/unicode 'optimizer.lr_start_decay_at': 0
  !!python/unicode 'optimizer.lr_stop_decay_at': 1000000000.0
  !!python/unicode 'optimizer.name': !!python/unicode 'Adam'
  !!python/unicode 'source.max_seq_len': 50
  !!python/unicode 'source.reverse': false
  !!python/unicode 'target.max_seq_len': 50
  !!python/unicode 'vocab_source': !!python/unicode '/home/rihards/experiments/seq2seq/en-lv-constrained-baseline-simple-tc/scripts/../data/general.vocab.bpe.32000'
  !!python/unicode 'vocab_target': !!python/unicode '/home/rihards/experiments/seq2seq/en-lv-constrained-baseline-simple-tc/scripts/../data/general.vocab.bpe.32000'

INFO:tensorflow:Creating vocabulary lookup table of size 32601
INFO:tensorflow:Creating vocabulary lookup table of size 32601
INFO:tensorflow:Creating BidirectionalRNNEncoder in mode=eval
INFO:tensorflow:
BidirectionalRNNEncoder:
  rnn_cell:
    cell_class: LSTMCell
    cell_params: {num_units: 512}
    dropout_input_keep_prob: 0.8
    dropout_output_keep_prob: 1.0
    num_layers: 2
    residual_combiner: add
    residual_connections: false
    residual_dense: false

INFO:tensorflow:Creating AttentionLayerBahdanau in mode=eval
INFO:tensorflow:
AttentionLayerBahdanau: {!!python/unicode 'num_units': 512}

INFO:tensorflow:Creating AttentionDecoder in mode=eval
INFO:tensorflow:
AttentionDecoder:
  !!python/unicode 'max_decode_length': 100
  !!python/unicode 'rnn_cell':
    cell_class: LSTMCell
    cell_params: {num_units: 512}
    dropout_input_keep_prob: 0.8
    dropout_output_keep_prob: 1.0
    num_layers: 4
    residual_combiner: add
    residual_connections: false
    residual_dense: false

INFO:tensorflow:Creating ZeroBridge in mode=eval
INFO:tensorflow:
ZeroBridge: {}

INFO:tensorflow:Starting evaluation at 2017-03-23-10:29:43
2017-03-23 12:29:43.447963: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:02:00.0)
INFO:tensorflow:Restoring parameters from /home/rihards/experiments/seq2seq/en-lv-constrained-baseline-simple-tc/scripts/../model/model.ckpt-900
2017-03-23 12:29:43.911377: W tensorflow/core/framework/op_kernel.cc:1152] Invalid argument: Input to reshape is a tensor with 6553600 values, but the requested shape has 0
         [[Node: model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"](model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/transpose, model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/stack)]]
2017-03-23 12:29:43.912289: W tensorflow/core/framework/op_kernel.cc:1152] Invalid argument: Input to reshape is a tensor with 6553600 values, but the requested shape has 0
         [[Node: model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"](model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/transpose, model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/stack)]]
Traceback (most recent call last):
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/rihards/programming/seq2seq/bin/train.py", line 263, in <module>
    tf.app.run()
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/home/rihards/programming/seq2seq/bin/train.py", line 258, in main
    schedule=FLAGS.schedule)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 111, in run
    return _execute_schedule(experiment, schedule)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 46, in _execute_schedule
    return task()
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 440, in train_and_evaluate
    self.train(delay_secs=0)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 230, in train
    monitors=self._train_monitors + extra_hooks)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 281, in new_func
    return func(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 430, in fit
    loss = self._train_model(input_fn=input_fn, hooks=hooks)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 981, in _train_model
    _, loss = mon_sess.run([model_fn_ops.train_op, model_fn_ops.loss])
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 484, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 821, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 777, in run
    return self._sess.run(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 939, in run
    run_metadata=run_metadata))
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 1155, in after_run
    induce_stop = m.step_end(self._last_step, result)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 356, in step_end
    return self.every_n_step_end(step, output)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 662, in every_n_step_end
    name=self.name)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 281, in new_func
    return func(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 518, in evaluate
    log_progress=log_progress)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 830, in _evaluate_model
    config=config_pb2.ConfigProto(allow_soft_placement=True))
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/evaluation.py", line 182, in _evaluate_once
    session.run(eval_ops, feed_dict)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 484, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 821, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 777, in run
    return self._sess.run(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 931, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 777, in run
    return self._sess.run(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 786, in run
    run_metadata_ptr)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 994, in _run
    feed_dict_string, options, run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1044, in _do_run
    target_list, options, run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1064, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 6553600 values, but the requested shape has 0
         [[Node: model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"](model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/transpose, model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/stack)]]
         [[Node: mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2/_429 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_426_mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Caused by op u'model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape', defined at:
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/rihards/programming/seq2seq/bin/train.py", line 263, in <module>
    tf.app.run()
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/home/rihards/programming/seq2seq/bin/train.py", line 258, in main
    schedule=FLAGS.schedule)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 111, in run
    return _execute_schedule(experiment, schedule)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 46, in _execute_schedule
    return task()
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 440, in train_and_evaluate
    self.train(delay_secs=0)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 230, in train
    monitors=self._train_monitors + extra_hooks)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 281, in new_func
    return func(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 430, in fit
    loss = self._train_model(input_fn=input_fn, hooks=hooks)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 981, in _train_model
    _, loss = mon_sess.run([model_fn_ops.train_op, model_fn_ops.loss])
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 484, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 821, in run
    run_metadata=run_metadata)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 777, in run
    return self._sess.run(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/training/monitored_session.py", line 939, in run
    run_metadata=run_metadata))
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 1155, in after_run
    induce_stop = m.step_end(self._last_step, result)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 356, in step_end
    return self.every_n_step_end(step, output)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/monitors.py", line 662, in every_n_step_end
    name=self.name)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 281, in new_func
    return func(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 518, in evaluate
    log_progress=log_progress)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 804, in _evaluate_model
    model_fn_results = self._get_eval_ops(features, labels, metrics)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1163, in _get_eval_ops
    features, labels, model_fn_lib.ModeKeys.EVAL)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1106, in _call_model_fn
    model_fn_results = self._model_fn(features, labels, **kwargs)
  File "/home/rihards/programming/seq2seq/bin/train.py", line 169, in model_fn
    return model(features, labels, params)
  File "/home/rihards/programming/seq2seq/seq2seq/models/model_base.py", line 112, in __call__
    return self._build(features, labels, params)
  File "/home/rihards/programming/seq2seq/seq2seq/models/seq2seq_model.py", line 262, in _build
    decoder_output, _, = self.decode(encoder_output, features, labels)
  File "/home/rihards/programming/seq2seq/seq2seq/graph_utils.py", line 38, in func_wrapper
    return templated_func(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 277, in __call__
    return self._call_func(args, kwargs, check_for_new_variables=False)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 217, in _call_func
    result = self._func(*args, **kwargs)
  File "/home/rihards/programming/seq2seq/seq2seq/models/basic_seq2seq.py", line 125, in decode
    labels)
  File "/home/rihards/programming/seq2seq/seq2seq/models/basic_seq2seq.py", line 88, in _decode_train
    return decoder(decoder_initial_state, helper_train)
  File "/home/rihards/programming/seq2seq/seq2seq/graph_module.py", line 57, in __call__
    return self._template(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 268, in __call__
    return self._call_func(args, kwargs, check_for_new_variables=False)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 217, in _call_func
    result = self._func(*args, **kwargs)
  File "/home/rihards/programming/seq2seq/seq2seq/decoders/rnn_decoder.py", line 111, in _build
    maximum_iterations=maximum_iterations)
  File "/home/rihards/programming/seq2seq/seq2seq/contrib/seq2seq/decoder.py", line 282, in dynamic_decode
    swap_memory=swap_memory)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2623, in while_loop
    result = context.BuildLoop(cond, body, loop_vars, shape_invariants)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2456, in BuildLoop
    pred, body, original_loop_vars, loop_vars, shape_invariants)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2406, in _BuildLoop
    body_result = body(*packed_vars_for_body)
  File "/home/rihards/programming/seq2seq/seq2seq/contrib/seq2seq/decoder.py", line 242, in body
    decoder_finished) = decoder.step(time, inputs, state)
  File "/home/rihards/programming/seq2seq/seq2seq/decoders/attention_decoder.py", line 167, in step
    self.compute_output(cell_output)
  File "/home/rihards/programming/seq2seq/seq2seq/decoders/attention_decoder.py", line 121, in compute_output
    values_length=self.attention_values_length)
  File "/home/rihards/programming/seq2seq/seq2seq/graph_module.py", line 57, in __call__
    return self._template(*args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 268, in __call__
    return self._call_func(args, kwargs, check_for_new_variables=False)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/template.py", line 217, in _call_func
    result = self._func(*args, **kwargs)
  File "/home/rihards/programming/seq2seq/seq2seq/decoders/attention.py", line 104, in _build
    scope="att_keys")
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args
    return func(*args, **current_args)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1433, in fully_connected
    outputs = layer.apply(inputs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 353, in apply
    return self.__call__(inputs, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 323, in __call__
    outputs = self.call(inputs, *args, **kwargs)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/layers/core.py", line 141, in call
    [0]])
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 2378, in tensordot
    a_reshape, a_free_dims, a_free_dims_static = _tensordot_reshape(a, a_axes)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 2345, in _tensordot_reshape
    reshaped_a = array_ops.reshape(array_ops.transpose(a, perm), new_shape)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2510, in reshape
    name=name)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 768, in apply_op
    op_def=op_def)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2336, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/home/rihards/anaconda2/envs/f27b/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1228, in __init__
    self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 6553600 values, but the requested shape has 0
         [[Node: model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/gpu:0"](model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/transpose, model/att_seq2seq/decode/attention_decoder/decoder/while/attention/att_keys/Tensordot/stack)]]
         [[Node: mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2/_429 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_426_mean/broadcast_weights/assert_broadcastable/AssertGuard/Assert/Switch_2", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

I am running the latest development version of Tensorflow (compiled from source from the master branch). This was to try to solve issue #69 I ran into earlier. I don't know if these things are related.

@dennybritz
Copy link
Contributor

Thanks for reporting, I do believe all of these issues are caused by the same problem, so I will close them and create a new issue to handle these: #103

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants