pdnn
pdnn copied to clipboard
Arbitrary intitialization & parallel conv networks
1- Now it accepts to initialize any layer of a network with the weights of any layer of another network (as long as they have the same description of course, i.e., same number of weights) I tried to be loyal to origin and didn't introduced new argument. Now, as the options of --ptr-layer-num instead of an integer, we can pass something like this: --ptr-layer-num "0,0:1,2:3,4" (it should be read like 0-->0: 1-->2: 3-->4 ) which means the weights of the 0 layer of the Saved network are copied to the 0 layer of the destination network, the 1 layer of the saved network are initializing the 2 layer of the dest.network and so on. It can come really handy when an RBM is trained and we want to use its weight to initialize the fc layers of a conv-network.
2- I introduce a new argument called --replicate. It accepts an integer for instance K which indicates that the convolution part of the network should be replicated K times. These replications will be parallel and have no connection. their outputs however, are passed to a single fc network. the description of the conv-spec is as the same as before and we only need to describe one conv-net, e.g., 1x28x28:64,3x3,p2x2,f but it has to be reminded that the input now is K times larger than before. for instance for K=4, each input row is 4 * 28 * 28 in the above example. The first 28_28 features are passed to the first network, the second 28_28 features are passed to the second network and so on.