CNTK
CNTK copied to clipboard
Extracting Weights from trained model
Is there a straightforward (or even not so straightforward) way of extracting the weights from a trained network? For example if I were to train an MLP with a single hidden layer (constructed as below) how would I go about extracting the weights associated with the Dense layer and the linear layer when I only have access to network
def create_network(input_var, num_hn):
h = Dense(num_hn, activation=tanh)(input_var)
network = linear_layer(h, 1) # linear_layer defined from example code
Look at cell [5] in this tutorial https://github.com/Microsoft/CNTK/blob/master/bindings/python/tutorials/CNTK_202_Language_Understanding.ipynb
The tutorial moved to this url: https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_202_Language_Understanding.ipynb