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

Still in epoch 1 #11

Open
vincentandreas opened this issue May 24, 2019 · 11 comments
Open

Still in epoch 1 #11

vincentandreas opened this issue May 24, 2019 · 11 comments

Comments

@vincentandreas
Copy link

I try to run your code, but it still in epoch one (not go to epoch two), but the iter increasing. I use several argprase when run your code

!python main.py --experiment_name=test --dropout=0.15 --batch_size=10 --hidden_size_encoder=20 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=30 --mode=train --gpu=1 --train_dir experiments

INFO:root:epoch 1, iter 3939, loss 6.04379, smoothed loss 6.18154, grad norm 4.54307, param norm 53.22952, batch time 1.682 INFO:root:epoch 1, iter 3940, loss 5.82439, smoothed loss 6.17797, grad norm 5.33789, param norm 53.23118, batch time 1.692

My question is, how many iter will do in one epoch? How to make one epoch only do 100 iter? and how long when you train SQUAD dataset using this code?

any response and answer from all of you will very help me. thank you

@HarnishLJ
Copy link

The training will run for infinite time, you have to stop your training when model is fully learn.
But I don't know what to do after that when model is fully learn from dataset.
Screenshot from 2019-05-30 11-22-08

@vincentandreas
Copy link
Author

@HarnishLJ but the strange thing is we still in epoch 1, even we already defined how many epoch when we run the main.py . I'm curious too, how we use trained model to do question answering like @priya-dwivedi website https://deeplearninganalytics.org/demos . Maybe anyone who read this issue can give us help?

@HarnishLJ
Copy link

image
@deperfecto Yes, I found this (See the picture) and In that they write (Number of epochs to train 0. 0 means train indefinitely)

@vincentandreas
Copy link
Author

@HarnishLJ ooh, I don't realize it have default value in the flags, and I don't change the num_epoch parameter too, thanks for realize me.

@HarnishLJ
Copy link

Ok welcome but tell me what to do next , I have trained this model up to 7000 iteration and still running, tell me where to stop training. and next what to do after stoping training. @deperfecto @priya-dwivedi
image

@vincentandreas
Copy link
Author

vincentandreas commented May 31, 2019

in flag mode, you can choose to 'show_examples', that will show random question, predicted answer, and the true answer. I have an idea to edit the code, so it can receive question for the user, and then predict the answer, Although it's strange, in the flag mode doesn't have 'test' mode .

@HarnishLJ
Copy link

yes. It will be really helpful to me and all, If you share screenshots how to change code or flags, even I don't know which flag I have to change. Please share step by step screenshots.Thanks @deperfecto @priya-dwivedi

@vincentandreas
Copy link
Author

vincentandreas commented May 31, 2019

@HarnishLJ The flag is mode=show_examples. (from the previous is mode=train)And this is the result when I execute that code.

!python /content/gdrive/"My Drive"/"Colab Notebooks"/cs224n-Squad-Project-master/code/main.py --experiment_name=aku_nyoba --dropout=0.15 --batch_size=60 --hidden_size_encoder=150 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=150 --mode=show_examples --gpu=1  --train_dir /content/gdrive/"My Drive"/"Colab Notebooks"/experiments

examples

I'm sorry, I haven't implemented my idea, to change the code, because for now I try to adjust the dataset for my local language.

@vincentandreas
Copy link
Author

vincentandreas commented Jun 25, 2019

hey @HarnishLJ, I found how to test using your own testing data, just make a json file, then use official_eval mode.

!python /content/gdrive/"My Drive"/"Colab Notebooks"/cs224n-Squad-Project-master/code/main.py --experiment_name=aku_nyoba --dropout=0.15 --batch_size=60 --hidden_size_encoder=150 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=150 --mode=official_eval --gpu=1  --train_dir /content/gdrive/"My Drive"/"Colab Notebooks"/experiments   --json_in_path /content/gdrive/"My Drive"/"Colab Notebooks"/cs224n-Squad-Project-master/data/FOR-TEST.json --ckpt_load_dir=/content/gdrive/"My Drive"/"Colab Notebooks"/experiments

then, the code will make prediction.json file, you can open the file to look the generated answer

*FOR-TEST json file format is like train-v1.1.json format, but without answer, and answer_start, you can edit the json

@vincentandreas
Copy link
Author

@HarnishLJ The flag is mode=show_examples. (from the previous is mode=train)And this is the result when I execute that code.

!python /content/gdrive/"My Drive"/"Colab Notebooks"/cs224n-Squad-Project-master/code/main.py --experiment_name=aku_nyoba --dropout=0.15 --batch_size=60 --hidden_size_encoder=150 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=150 --mode=show_examples --gpu=1  --train_dir /content/gdrive/"My Drive"/"Colab Notebooks"/experiments

examples

I'm sorry, I haven't implemented my idea, to change the code, because for now I try to adjust the dataset for my local language.

@HarnishLJ btw, how good your result by testing using show_examples mode? My result is not too good, just 5 correct from 10 questions, I don't know how to increase the result. Maybe anyone who read this can told us how good when you show_example the model?

@mady143
Copy link

mady143 commented Feb 28, 2020

Hi @deperfecto @HarnishLJ @priya-dwivedi @yuzehe ,
Actually I am at initial state only at first i run with --mode=train and in code i had given the no of epochs=5 but its is still in epoch 1 and iterations are increases.
at first i run with
1.python code/main.py --experiment_name=bidaf_best --dropout=0.15 --batch_size=60 --hidden_size_encoder=150 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=150 --mode=train

supose after some x iterations i tried like

2.python code/main.py --experiment_name=bidaf_best --dropout=0.15 --batch_size=60 --hidden_size_encoder=150 --embedding_size=100 --do_char_embed=False --add_highway_layer=True --rnet_attention=False --bidaf_attention=True --answer_pointer_RNET=False --smart_span=True --hidden_size_modeling=150 --mode=shoow_examples

and later what i have to do for testing purpose getting questions and answers

@deperfecto earlier comments you have discussed like test with some json file how can i do that testing process and how good the result be can you explain me clearly

Thank and Regards,
Manikantha Sekhar.

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