Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

ValueError: invalid literal for int() with base 10: 'B-sent' #1

Open
iamjihyeon opened this issue May 9, 2019 · 6 comments
Open

ValueError: invalid literal for int() with base 10: 'B-sent' #1

iamjihyeon opened this issue May 9, 2019 · 6 comments

Comments

@iamjihyeon
Copy link

iamjihyeon commented May 9, 2019

Hi,
I'm trying to run this project by my own data, But I got this error.

My environment :
Tensorflow == 1.13.1
numpy == 1.16.2
keras == 2.2.4

Epoch 1 out of 15
Traceback (most recent call last):
File "./run_seqtag_trainer.py", line 4, in
trainer.train(config_path='/home/tsnlp/seqtag/example_config.json')
File "/home/tsnlp/seqtag/seqtag/trainer.py", line 50, in train
model.train(train, dev)
File "/home/tsnlp/seqtag/seqtag/base_model.py", line 123, in train
score = self.run_epoch(train, dev, epoch)
File "/home/tsnlp/seqtag/seqtag/ner_model.py", line 290, in run_epoch
[self.train_op, self.loss, self.merged], feed_dict=fd)
File "/home/tsnlp/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/home/tsnlp/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1121, in _run
np_val = np.asarray(subfeed_val, dtype=subfeed_dtype)
File "/home/tsnlp/anaconda3/envs/nlp/lib/python3.6/site-packages/numpy/core/numeric.py", line 538, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: invalid literal for int() with base 10: 'B-sent'

@bedapudi6788
Copy link
Owner

Can you please share your config file and couple of examples from your training data.

@iamjihyeon
Copy link
Author

iamjihyeon commented May 9, 2019

Here is my config file, ( I just edit the path)

{

"data_folder": "/home/tsnlp/seqtag/test_data/",
"dir_output": "/home/tsnlp/seqtag/test_output/",
"glove_path": "/home/tsnlp/seqtag/glove.6B.300d.txt",
"nepochs": 15,
"batch_size": 32,
"dropout": 0.5,
"nepoch_no_imprv": 3,
"use_chars": 1

}

I generated train data from your git /deepsegment/data/data_gen.py
Until the word token of 400 (linenumber is about 400) was executed correctly, it suddenly caused the following error (ValueError).

Here is examples of train data.

the B-sent
optional O
payment O
charge O
will O
not O
be O
refunded. O

the B-sent
change O
reissue O
charge O
is O
non O
refundable O

yq B-sent
will O
not O
be O
refunded O
for O
nonrefundable O
fares O

@bedapudi6788
Copy link
Owner

if possible, can you email the config file and the train and validation data files. that would be helpful in figuring out where it's going wrong.

@iamjihyeon
Copy link
Author

I send you email :)

@bedapudi6788
Copy link
Owner

Got the email, but there is only train and config file. Can you also send the validation data.

@bedapudi6788
Copy link
Owner

got both the files now, will check and get back to you.

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