Train steps stop at 1, while it is set to 5 (UNQ_C4)

Hello, for some reason the train steps keep stopping at 1 and not continuing to 5. Why does it stop so early?

Thanks!
Adam

BTW, when I re-run the same cell again, I do not get any outputs:

Hi @cmosguy

Add n_steps_per_checkpoint=1 (the number you want) in the training.TrainTask(...) (in the train_model function definition).

Cheers

@arvyzukai thank you for your reply. n_steps_for_checkpoint is a logging feature flag from what I can tell.

What I am trying to understand is what do I need to do to train the model for longer to make it more accurate? Your notebook assignment comes with a model.pkl.gz. What do I need to run the model longer to match what you pretrained the model to?

Thanks!

@cmosguy

Oh, you did everything correct - more train_steps = more training. I though you wanted to see the progress more frequently :slight_smile: (default setting is 500 if I remember correctly).

I think the Coursera backend would not like you training too long :slight_smile: (it probably would take a long time and multiply that by amount of students … ).

You can try setting `lr=0.001’ and running for 500 steps would give you some decent model but you might not want to abuse it :slight_smile:

Cheers

P.S.
Btw I realized, that depending on your experience with trax you might have troubles, so if you would want to try it yourself you should change these bits in the code:
In # UNQ_C4:

  • add n_steps_per_checkpoint=50 inside the training.TrainTask(...
  • do not initialize the Siamese variable inside training.Loop(... just use Siamese without brackets

In the following cell:

  • modify train_steps = 750
  • pass the model to the training loop like: training_loop = train_model(model, .. (not the Siamese class as in the assignment)

NOTE!!! : this will mess your assignment and you would not pass the grading, so experiment with a backup or when you passed the assignment. Again - this is not a solution for future readers :slight_smile:

1 Like

Hey @arvyzukai this was really helpful. Thanks for clarifying how to run the loop longer. It is much appreciated.

1 Like