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

Move root_net_ check in net constructor #4806

Closed
wants to merge 1 commit into from

Conversation

junshi15
Copy link

@junshi15 junshi15 commented Oct 4, 2016

This PR extends recurrent_layer to the multi-gpu settings.

Currently, the recurrent_layer constructs a net internally (the unrolled net), https://github.com/BVLC/caffe/blob/master/src/caffe/layers/recurrent_layer.cpp#L108.
No root_net_ is set in that constructor. In a multi-gpu setting, worker solver will create an unrolled net too, however it will fail at the line below, https://github.com/BVLC/caffe/blob/master/src/caffe/net.cpp#L50-L51, because the worker solver is not a root solver and the net does not have a root_net.

Since root_net is only used in share_from_root, this PR moves the check to where share_from_root is defined.

@shelhamer
Copy link
Member

Heads-up: the root_net_ is going away entirely as part of the simplifications in #4563.

@junshi15
Copy link
Author

That's a large PR, may take a while. It may make sense merging this one first.

Similar complaints here: #4851

@shelhamer
Copy link
Member

This should be unnecessary with the merge of #4563, but thank you for proposing a fix. @junshi15 and @SIshijima could you check that #4563 in fact fixes the issue?

@junshi15
Copy link
Author

@shelhamer I won't have time to verify the recurrent layer at this moment as I am quite busy at work. Let me close this PR for now. If we see problems in the future, we will re-visit it.

@junshi15 junshi15 closed this Jan 20, 2017
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.

2 participants