Merged
Conversation
python/draw_net.py
Outdated
| elif args.phase == "TEST": | ||
| phase = caffe.TEST | ||
| elif args.phase != "ALL": | ||
| raise Exception("Unknown phase: " + args.phase) |
Contributor
There was a problem hiding this comment.
Probably want a ValueError instead of a bare Exception here.
Contributor
|
This doesn't actually work. Try running it on Plus, you're not handling the |
Contributor
Author
|
Thanks @lukeyeager for your review, I think I have fixed all of the issues you mentioned. I didn't even know about |
Contributor
|
LGTM. Works on LeNet and also some slightly tricker networks I made for testing #3863. |
Member
|
Thanks Carl! |
fxbit
pushed a commit
to Yodigram/caffe
that referenced
this pull request
Sep 1, 2016
Add phase support for draw net
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 5, 2018
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 13, 2018
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 13, 2018
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 13, 2018
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 13, 2018
timofey-retailnext
pushed a commit
to retailnext/caffe
that referenced
this pull request
Jun 13, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #4365, Caffe's draw.py doesn't understand net phases, which makes it difficult to draw networks like VAEs where training and testing networks tend to have very different structure. This small PR adds support for it. I have tested it with the networks in my VAE tutorial (there appear to be no unit tests for draw net, and it's not clear how they would be implemented), and it works. It should be ready to merge.