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

How about we don't use actively terrible julia code as a common demo? #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oxinabox
Copy link
Member

I fixed it from being the worst by putting it in a function.
Though I wonder if better would have been to fix it with const + making loss(m) = (x,y)->... etc.

@tk3369
Copy link

tk3369 commented Feb 14, 2020

I think it's best to promote good practice. I imagine that people would take a template from model zoo and start manipulating it into their own use cases.

@oxinabox
Copy link
Member Author

People do.
E.g, i see very similar code is now in:
JuliaLogging/TensorBoardLogger.jl#60

@jamblejoe
Copy link

This was suggested for the examples in Flux.jl as well, see FluxML/Flux.jl#1085.
I find it easiest to suround critical parts in let ... end blocks.

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.

3 participants