-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! Do you think you could add a test for this behavior, possibly by cloning and modifying the test in 'training_test' named '1 input, 1 output, dense, 1 weight, string optimizer, 2 epochs'?
Reviewable status: 0 of 1 LGTMs obtained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 LGTMs obtained
src/engine/training.ts, line 1311 at r2 (raw file):
?: number
Why is it necessary to change = 0
to ?: number
here? I don't think this change is necessary.
src/engine/training_test.ts, line 521 at r2 (raw file):
expect(history.epoch).toEqual([1]);
Can we test this more thoroughly by making an assertion on history.history.loss
? Something like:
expect(history.history.loss.length).toEqual(1);
Quote from @shanqing-cai
end of quote. I can make the requested changes, I was just trying to make initialEpoch follow the same format as: epochs, batchSize and shuffle, since the following code already covers the default settings.
P.S. I notice the above code does not detect incorrect negative inputs, would the following code be an improvement?
Either way I am fine with whatever you think is best, just thought I would explain my thinking with the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - that works. So if you can address my other comment about adding some more testing assertions, I will approve this PR.
Thanks.
Reviewable status: 0 of 1 LGTMs obtained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 2 of 1 LGTMs obtained
See feature request to activate initialEpoch at
tensorflow/tfjs#497
This change is