-
Notifications
You must be signed in to change notification settings - Fork 171
Add verbose option #16
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
base: master
Are you sure you want to change the base?
Add verbose option #16
Conversation
Hi @ProGamerGov! Just fixed the merged conflicts introduced with the latest and greatest from the master branch so I'm bumping this up for visibility. The -verbose flag is super helpful when running in Colab notebooks, especially as I have this in front of a group of designers at our company right now. Let me know if you have a thought on another way you'd like to see this implemented. Thanks! |
@momo-the-monster Nice work! I'm not sure about using a ton of if statements to block all the print statements. It's fine to use that once in CaffeLoader to block printing the conv layers, but it looks a bit ugly to use it for every print statement. I guess one could use: Also, the verbose parameter doesn't need to use integers. It can just be a boolean flag. |
Hm, agreed. I don't work in Python much -what do you think about using the built-in logging library (or a third-party one like loguru) where the user could configure what level they want to print? That way I could easily supress anything error or below. |
…tyle-pt into feature/add-verbose-option # Conflicts: # CaffeLoader.py # neural_style.py
…the-monster/neural-style-pt into feature/add-verbose-option # Conflicts: # CaffeLoader.py # neural_style.py
@ProGamerGov - had another go at this, much simpler this time around. I just added a -log_level parameter and switched all the print() commands to logging.info() commands. The log level is INFO by default, so everything shows up. If you pass -log_level 30 or higher, then you get no outputs. Future-compatible because any new code can just log using the appropriate level, the param supports all Python log levels. It looks like you've got a couple of branches in various states so I made this off the latest master. Happy to redo it off another branch if that makes it more likely to get merged. |
Thanks for all your work on this project! I'm using it for Colab notebook experiments and found that it printed more lines to the console than I would like, so I added this -verbose flag in for myself so I could set it to 0 when I don't need as many updates.