Open lyriccoder opened 5 years ago
Hi, Im having a similar problem. Did you find out what the problem was?
Hi @johny-smith Unfortunately, no. This problem happens if I use CPU only. Seems there is a bug with CPU version, maybe even in tensorflow. I have to buy a GPU unit, it's ok for GPU unit. So, I used a workaround
I am trying to train my own data for text classification (multiple classes). I'm trying to run it with the following command:
python run_classifier.py --task_name=cola --do_train=true --do_eval=true --do_predict=true --data_dir=./data/ --vocab_file=./uncased_L-12_H-768_A-12/vocab.txt --bert_config_file=./uncased_L-12_H-768_A-12/bert_config.json --init_checkpoint=./uncased_L-12_H-768_A-12/bert_model.ckpt --max_seq_length=400 --train_batch_size=8 --learning_rate=2e-5 --num_train_epochs=3.0 --output_dir=./bert_output/ --do_lower_case=True
I used the following pretrained model: uncased_L-12_H-768_A-12
Data is the following: https://bitbucket.org/lyriccoder/bert/downloads/dev.tsv https://bitbucket.org/lyriccoder/bert/downloads/test.tsv https://bitbucket.org/lyriccoder/bert/downloads/train.tsv
Here is my run_classifier.py. I changed it since I have several classes:
run_classifier.zip I've just changed the number of classes for ColaProcessor:
I have the following stacktrace:
I have googled a lot and the problem is related to number of words in vocabulary. But this number in the config is large:
I use only CPU. Also some people tells that the problem happens with CPU only, not GPU.
Here is my PC info:
Could you please help?