apples-oranges
apples-oranges

Reputation: 987

Caffe transfer subset of parameters

I want to take out a subset of n parameters in a given layer from a trained network A, and transfer this subset into a layer of another network B. In the layer to which this subset is transferred, the remaining parameters of said layer (total - transferred subset) should be randomly initialized.

Is this achievable? (I know it can be done with whole layers of parameters)

Thank you!

Upvotes: 1

Views: 325

Answers (1)

Shai
Shai

Reputation: 114796

This can be done in python. See net surgery tutorial.
Basically, you should instantiate two caffe.Net objects one with parameters of A and the other with random. Then you simply assign the subset of parameters from A to B, saves B and you are done.

Upvotes: 2

Related Questions