vardaan123 / Corr-seq-labeling

Code for paper "Joint Learning of Correlated Sequence Labelling Tasks Using Bidirectional Recurrent Neural Networks"
11 stars 4 forks source link

Module problem #3

Closed sl403 closed 4 years ago

sl403 commented 4 years ago

hi, i try to run your scripts but i got some errors. no module name "deep.utils" how can i resolve this error, thanks.

vardaan123 commented 4 years ago

Hi, you need to clone the repo in a directory named "deep" and add the path of deep/ to PYTHONPATH environment variable.

sl403 commented 4 years ago

Thanks for your reply. It resolved my problem. But I have another question about the file of "sequence_labeling/init.py". Is it missing some files like "RNNSequenceLabelling", "BiRNNSequenceLabelling" when i run your scripts?

sl403 commented 4 years ago

oh i found it. thank you.

sl403 commented 4 years ago

Hi, The scripts of the training model are all perfect. But when I run "evaluateSequenceLabels.py" I get error. How can I solve this problem? Thank you!

$ ./../../src/bin/evaluateSequenceLabels.py seq_labelling_logs/punc7_4cl_rnn256_gru_bat64_layer1

I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "./../../src/bin/evaluateSequenceLabels.py", line 15, in model = predict(model_dir = model_dir) File "/home/user/github/Corr-seq-labeling/src/bin/PredictRNNSequenceLabelling.py", line 84, in init output_dropout_keep_prob = self.output_dropout_keep_prob) File "/home/user/github/Corr-seq-labeling/src/bin/RNNSequenceLabelling.py", line 149, in inference weights = tf.Variable(tf.truncated_normal([self.rnn_size, self.num_classes], mean=0.0, stddev=0.01), File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/random_ops.py", line 168, in truncated_normal shape_tensor = _ShapeTensor(shape) File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/random_ops.py", line 42, in _ShapeTensor return ops.convert_to_tensor(shape, dtype=dtype, name="shape") File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 657, in convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 180, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 163, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape)) File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 422, in make_tensor_proto tensor_proto.string_val.extend([compat.as_bytes(x) for x in proto_values]) File "/home/user/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/util/compat.py", line 64, in as_bytes (bytes_or_text,)) TypeError: Expected binary or unicode string, got 256