-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove('trainable') Lasagne's command doesn't work in nolearn #306
Comments
Could you post a minimal code example that reproduces the error? From your description, it is not quite clear to me what you did. Thank you. |
I have a CNN perfectly working and trained. At the end of the training I save the parameters into a file named "file_modelCNN". Next step I want to upload the parameters from that file to train again a CNN having the same convolutional layers of the previous but different number of dense layers. This in order to keep freeze the weitghs of the convolutional layers. Lasagne provide the comment remove('trainable') that is working in a Lasagne NN but appear to me that it is not working in a NN created with nolearn NeuralNet. Here after the code:
and the error message To support the understanding I put hereafter the same code written for a Lasagne NN that appear to work. `# Carica i pesi del modello dal file for key,val in network.iteritems(): many thanks |
The error is that you try to access the network's layers by using brackets, which does not work: |
Sorry it still doesn't work, I report a bigger portion of the code
and also the error message
|
initialize the net first: |
This solve the issue, many thanks |
I would ask to keep working the Lasagne's command remove('trainable') needed after loading pretrained models to train those again in a modified model. I realised that this is not working due to the error message received and no mention into documentation. Appear to me that the function 'fit' doesn't know how to manage it, but please sorry if I'm wrong
The text was updated successfully, but these errors were encountered: