Skip to content

Add phase support for draw net#4408

Merged
shelhamer merged 1 commit intoBVLC:masterfrom
cdoersch:draw_net_phase
Jul 11, 2016
Merged

Add phase support for draw net#4408
shelhamer merged 1 commit intoBVLC:masterfrom
cdoersch:draw_net_phase

Conversation

@cdoersch
Copy link
Contributor

@cdoersch cdoersch commented Jul 3, 2016

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.

elif args.phase == "TEST":
phase = caffe.TEST
elif args.phase != "ALL":
raise Exception("Unknown phase: " + args.phase)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want a ValueError instead of a bare Exception here.

@lukeyeager
Copy link
Contributor

This doesn't actually work. Try running it on examples/mnist/lenet_train_test.prototxt. ALL and TRAIN come out looking equivalent.

Plus, you're not handling the exclude case.

@cdoersch
Copy link
Contributor Author

cdoersch commented Jul 5, 2016

Thanks @lukeyeager for your review, I think I have fixed all of the issues you mentioned. I didn't even know about exclude!

@lukeyeager
Copy link
Contributor

LGTM. Works on LeNet and also some slightly tricker networks I made for testing #3863.

@shelhamer shelhamer merged commit 776b301 into BVLC:master Jul 11, 2016
@shelhamer
Copy link
Member

Thanks Carl!

fxbit pushed a commit to Yodigram/caffe that referenced this pull request Sep 1, 2016
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 5, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 13, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 13, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 13, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 13, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
timofey-retailnext pushed a commit to retailnext/caffe that referenced this pull request Jun 13, 2018
…doersch/draw_net_phase"

This reverts commit 776b301, reversing
changes made to 3e94c0e.
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

Comments