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

Activation statistics should only be collected during the training #72

Merged
merged 1 commit into from Apr 8, 2019
Merged

Activation statistics should only be collected during the training #72

merged 1 commit into from Apr 8, 2019

Conversation

madaan
Copy link
Contributor

@madaan madaan commented Apr 7, 2019

The activation statistics should only be collected during the training, and not validation. The fix is to check for the flag self.training which is set when model.training() is called.

@review-notebook-app
Copy link

Check out this pull request on ReviewNB: https://app.reviewnb.com/fastai/fastai_docs/pull/72

Visit www.reviewnb.com to know how we simplify your Jupyter Notebook workflows.

@AlisonDavey
Copy link

Couldn't we just plot the training part of the statistics, e.g. ax0.plot(ms[:int(x_train.shape[0]/bs)])?

@AlisonDavey
Copy link

As in this notebook: https://gist.github.com/AlisonDavey/a9fc0181c988dfd7178fa01264d785f0

@jph00 jph00 merged commit 57cca6c into fastai:master Apr 8, 2019
@jph00
Copy link
Member

jph00 commented Apr 8, 2019

Couldn't we just plot the training part of the statistics, e.g. ax0.plot(ms[:int(x_train.shape[0]/bs)])?

That should work too.

@madaan
Copy link
Contributor Author

madaan commented Apr 8, 2019

Hey @AlisonDavey, while that may work in this case for now, the solution makes an assumption about the order of training and validation data, and thus might not be the best way to go about it.

@AlisonDavey
Copy link

I appreciate that we need to understand the order of training and validation data but this is a more robust solution since once we start to use PyTorch hooks we no longer use the class SequentialModel where the update 'self.training' was made.

@madaan
Copy link
Contributor Author

madaan commented Apr 10, 2019

I appreciate that we need to understand the order of training and validation data but this is a more robust solution since once we start to use PyTorch hooks we no longer use the class SequentialModel where the update 'self.training' was made.

Thanks, fixed here: #80

@jph00
Copy link
Member

jph00 commented Apr 10, 2019 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants