Extracting layer weights
I'd like to extract the learned weights from a layer (not the layer output for some input). I've been looking for a notebook which does this. Can someone point me in the right direction?
If you are using model.FeedForward, you can get all weights dictionary by getting m.arg_params, where m is the model
Great, thanks! Do I need to do anything to make it not optimize out those layers? Basically I want to extract all of the weights from my first convolution layer.
No. Weight will not be optimized out :)
Working great, thanks!
m.arg_params return to me a dictionary, how to extract the learned weights?
In R is model$arg_params to take all and model$arg_params$fc1_weight to take onli the weight of layer one.