soumith / net2net.torch

Implementation of http://arxiv.org/abs/1511.05641 that lets one build a larger net starting from a smaller one.
160 stars 37 forks source link

Modified n2n.deeper to return flat network instead of adding sub-network #4

Closed dasguptar closed 8 years ago

dasguptar commented 8 years ago

Tests seem to be passing. Let me know if this is fine or more changes are needed before merge.

soumith commented 8 years ago

this only holds true if the original network is Sequential. If you return a subnetwork instead, then it works regardless. If you want to not return a subnetwork, first check that the Container you are operating upon is Sequential. If it is not, fallback to subnetwork method.

dasguptar commented 8 years ago

I made some changes that might be enough to accomplish what was required. Now, only if the original network is sequential, then layers are inserted, otherwise the sub-network is returned. Sorry if the commits are messed up, my git knowhow is not that great.

soumith commented 8 years ago

Thanks!