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

Question about running the pretrain.py #23

Open
littleflow3r opened this issue Nov 19, 2019 · 2 comments
Open

Question about running the pretrain.py #23

littleflow3r opened this issue Nov 19, 2019 · 2 comments

Comments

@littleflow3r
Copy link

littleflow3r commented Nov 19, 2019

Hey,

I have difficulties in running the pretrain, any help would be appreciated.
So I've prepared corpus.txt (quite small, about 1000 lines) that looks like this:

document 1 line 1...
document 1 line 2...
document 1 line 3...

document 2 line 1...
document 2 line 2...
document 2 line 3...

And I run the pretrain.py but I got an error on train.py file, on this line:
print('Epoch %d/%d : Average Loss %5.3f'%(e+1, self.cfg.n_epochs, loss_sum/(i+1)))
So for the time being I commented that line.

And after I run again, here what I got:

Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
Iter (loss=X.XXX): 0it [00:00, ?it/s]
....

Could you please point me where I could possibly make the mistake?
Thanks!

p.s. I have commented some part of the code in train.py (the part where it loads the checkpoint, because I dont install the tensorflow for a reason). What I want to do for now is training a pretrained bert model using my own data. I am not sure if it is causing the error above?

@littleflow3r littleflow3r changed the title Trouble in running the pretrain.py Question about running the pretrain.py Nov 19, 2019
@Seoinsuk1
Copy link

same here

@Tikquuss
Copy link

I had the same problem as you.
But after I had checked I noticed that my dataset was empty (I'm talking about data_iter on line 219 of pretrain.py), because I specified the data in the wrong format.

My problem has been solved.

bt

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