Well, this is confusing.
I’ve been training a U-Net. Now I want to cut off the decoder part and use the encoder as the backbone for a classifier.
This seems to pull out the model, and I can pull out the encoder part of the model
newmodel = children(learn.model[:4])
I assumed that newmodel will be the encoder part with the weights trained up to that point in my code.
But when I call a new cnn_learner it gives an TypeError: unhashable type ‘list’
new_learn = cnn_learner(new_data, newmodel, path=savedir
Can anyone help? When I call models.resnet50, it also does not give a print out of layers. How do I convert a learner.model to be usable by another learner?