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

Would a TimedModule decorator be useful? #80

Open
juesato opened this issue Dec 13, 2016 · 3 comments
Open

Would a TimedModule decorator be useful? #80

juesato opened this issue Dec 13, 2016 · 3 comments

Comments

@juesato
Copy link
Contributor

juesato commented Dec 13, 2016

The interface would be something like nn.TimedModule(module, print_interval, name), and after print_interval calls to the module, it would print name and the average time for a forwards and backwards pass. If this seems useful, I'm happy to implement it here, or if there are other ways of timing specific modules / technical issues I'm overlooking, that'd be useful too.

@nicholas-leonard
Copy link
Member

That would indeed be useful!

@nicholas-leonard
Copy link
Member

I would call it nn.Profile, but the naming is up to you.

@juesato
Copy link
Contributor Author

juesato commented Dec 16, 2016

Sorry for the delay on this - I wrote something, but the results look strange to me. I probably won't work on it this week, but I'll submit a PR this weekend.

@juesato juesato mentioned this issue Feb 1, 2017
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

2 participants