2

For some reason I want to test the difference in the performance of a detector and his identical version but finetuned with some 3d convolutions.
The model of the detector is google EfficientDet, the weights are finetuned on custom data.
I was wondering if it was possible to load my custom weight in a model in which the graph-def is not the same (there would be 3d convolutions at some layers). And what could be the way to do that.
I'm new to Tensorflow and a bit sad because in Pytorch this would be so easy

Thanks

1 Answer 1

1

You can load the second model, get weights of the layer and set weights of your model:

source_model = keras.models.load_model('path/to/location')
weight = source_model.layers[0].get_weights()   # <= change index here
EfficientDetModel.layers[0].set_weights(weight) # <= change index here
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.