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

error while training #3

Open
mdeora opened this issue Apr 4, 2017 · 5 comments
Open

error while training #3

mdeora opened this issue Apr 4, 2017 · 5 comments

Comments

@mdeora
Copy link

mdeora commented Apr 4, 2017

Traceback (most recent call last):
File "train.py", line 136, in
train_cnn()
File "train.py", line 59, in train_cnn
l2_reg_lambda=params['l2_reg_lambda'])
File "/webserver/github/multi-class-text-classification-cnn/text_cnn.py", line 49, in init
self.h_pool = tf.concat(3, pooled_outputs)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1047, in concat
dtype=dtypes.int32).get_shape(
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor
as_ref=False)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 716, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/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.

@jiegzhan
Copy link
Owner

jiegzhan commented Apr 4, 2017

Which version of tensorflow?

I was using tensorflow 0.9 to train the model.

@mdeora
Copy link
Author

mdeora commented Apr 5, 2017

I am on 1.0.1

@mookrs
Copy link

mookrs commented Apr 5, 2017

@mdeora
Copy link
Author

mdeora commented Apr 5, 2017

Thanks it works now, but another error during predict

Traceback (most recent call last):
File "predict.py", line 73, in
predict_unseen_data()
File "predict.py", line 19, in predict_unseen_data
checkpoint_file = tf.train.latest_checkpoint(checkpoint_dir + 'checkpoints')
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1493, in latest_checkpoint
if file_io.get_matching_files(v2_path) or file_io.get_matching_files(
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 269, in get_matching_files
compat.as_bytes(filename), status)]
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 89, in exit
next(self.gen)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/ubuntu/multi-class-text-classification-cnn/trained_model_1479757124/checkpoints

@jiegzhan
Copy link
Owner

jiegzhan commented Apr 5, 2017

jiegzhan/multi-class-text-classification-cnn-rnn#2

Please look at the issue above.

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

3 participants