Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gettin error while running idc_train.py #71

Open
thombrey-vinil opened this issue Aug 5, 2018 · 3 comments
Open

Gettin error while running idc_train.py #71

thombrey-vinil opened this issue Aug 5, 2018 · 3 comments

Comments

@thombrey-vinil
Copy link

Error:

INFO:tensorflow:Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0xd27c57c88>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_tf_config': gpu_options {
per_process_gpu_memory_fraction: 1.0
}
, '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': 600, '_save_checkpoints_steps': None, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_model_dir': None}
WARNING:tensorflow:From /Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/monitors.py:267: BaseMonitor.init (from tensorflow.contrib.learn.python.learn.monitors) is deprecated and will be removed after 2016-12-05.
Instructions for updating:
Monitors are deprecated. Please use tf.train.SessionRunHook.
INFO:tensorflow:No glove/vocab path specificed, starting with random embeddings.
Traceback (most recent call last):

File "", line 1, in
runfile('/Users/vinilthombrey/Downloads/chatbot-retrieval-master/udc_train.py', wdir='/Users/vinilthombrey/Downloads/chatbot-retrieval-master')

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/Users/vinilthombrey/Downloads/chatbot-retrieval-master/udc_train.py", line 64, in
tf.app.run()

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "/Users/vinilthombrey/Downloads/chatbot-retrieval-master/udc_train.py", line 61, in main
estimator.fit(input_fn=input_fn_train, steps=None, monitors=[eval_monitor])

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 281, in new_func
return func(*args, **kwargs)

File "/Users/vinilthombrey/anaconda/lib/python3.6/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 "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 927, in _train_model
model_fn_ops = self._get_train_ops(features, labels)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1132, in _get_train_ops
return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.TRAIN)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1103, in _call_model_fn
model_fn_results = self._model_fn(features, labels, **kwargs)

File "/Users/vinilthombrey/Downloads/chatbot-retrieval-master/udc_model.py", line 39, in model_fn
targets)

File "/Users/vinilthombrey/Downloads/chatbot-retrieval-master/models/dual_encoder.py", line 54, in dual_encoder_model
tf.concat(0, [context_embedded, utterance_embedded]),

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat
dtype=dtypes.int32).get_shape(

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 639, in convert_to_tensor
as_ref=False)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 704, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 370, in make_tensor_proto
_AssertCompatible(values, dtype)

File "/Users/vinilthombrey/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))

TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

@amycardoso
Copy link

amycardoso commented Sep 8, 2018

Same error, did you found a solution @thombrey-vinil ?

@nidhikamath91
Copy link

Changing tf.concat(0, [context_embedded, utterance_embedded]) to tf.concat([context_embedded, utterance_embedded], 0) resolved the issue

@seaweiqing
Copy link

This should be counted as one of the errors caused by different version of tensorflow

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

No branches or pull requests

4 participants