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
caffe: model definition: write same layer with different phase using python #4044
Comments
I want to do exactly the same thing but haven't figured out how yet. You can pass name= and top= arguments when creating the layers (which must have different names in Python), but then I don't know how to make the next layer take, as input (bottom), those layers under their name= name (NOT their Python name). |
@raaaaaymond there is a workaround, you can find it here. |
Ah yes. I didn't fully understand your answer there the first time I read it. I do now. Thank you. Still the solution is a little bit hacky (as you pointed out). But luckily in my case it does solve my problem. |
I see this issue was raised also here. Any chance this will be addressed soon? |
I find the solution proposed in this SO answer to be quite nice and elegant. I believe this solution may close this issue. Here's the proposed workaround (using
Results with
|
what if I want to write this? |
I solved the problem by using |
I want to set up a caffe CNN with python. Although I saw we can put test net in solver.prototxt, I would like to write it in model.prototxt with different phase using caffe.NetSpec(). For example, caffe model prototxt implement two data layer with different phases:
How should I do to get two layers with same name, but different phases?
The text was updated successfully, but these errors were encountered: