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

how to share the parameters in nngraph #114

Open
duanLH opened this issue May 17, 2016 · 8 comments
Open

how to share the parameters in nngraph #114

duanLH opened this issue May 17, 2016 · 8 comments

Comments

@duanLH
Copy link

duanLH commented May 17, 2016

Thanks for your attention
I want to share the parameters in some layers when using the nngraph to construct a net.please help me

@soumith
Copy link
Member

soumith commented May 17, 2016

you use the :share method. See this documentation: https://github.com/torch/nn/blob/master/doc/module.md#sharemlps1s2sn

@duanLH
Copy link
Author

duanLH commented May 18, 2016

I know this method, but in nngraph, if I want to share the parameter between layer1 and layer2,it would say "no share method"

@RuiShu
Copy link

RuiShu commented May 18, 2016

Have you considered sharing the layer parameters beforehand prior to building your network with nngraph?

@duanLH
Copy link
Author

duanLH commented May 18, 2016

@soumith I know this method, but in nngraph, if I want to share the parameter between layer1 and layer2,it would say "no share method"

@duanLH
Copy link
Author

duanLH commented May 18, 2016

@RuiShu I considered, but if are many gmodules ,I do not know how to assemble them together

@RuiShu
Copy link

RuiShu commented May 18, 2016

@duanLH I recommend posting a more detailed question on https://groups.google.com/forum/#!forum/torch7; you'll likely find help there.

@duanLH
Copy link
Author

duanLH commented May 18, 2016

@RuiShu thanks~

@Amir-Arsalan
Copy link

@duanLH I was trying to find a solution for another problem I have and I hit your thread. I suggest you take a look at this post regarding my issues with parameter sharing in Torch using nngraph. Hope this helps!

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

No branches or pull requests

4 participants