Closed Umar-Ayub closed 5 years ago
Can you explain what you mean by "finetuning the model". Does it mean that you are making changes to a saved model afterwards? If that's the case, how do you access the model?
Hey @mikkokotila , so I am using InceptionResnetV2 with imagenet weights accesible via keras.applications.
The code goes something like the following:
from keras.applications import InceptionResnetV2
base_model = InceptionResnetV2(include_top = False, weights = 'imagenet', input_shape=(row, col, channels))
and then base_model is added to the model inside the fundal_model() function. However the above code fails with any of the pretrained models available via keras.applications. It precisely fails at the attachment point where we are connecting a pretrained model to other densely connected or custom layers such as Dense()
Yes, it will definitely fail with any pre trained models. This relates with a known issue in the way Keras handles pre-trained TensorFlow models. I found that the safest way to overcome it is by actually saving a trained model on the disk, and then before using it, loading it.
In case you want to check it out, the related Keras issue is here
Closing here. Feel free to re-open if I missed something.
Hey I am using Talos to finetune a pretrained CNN. I keep getting an error where it says that the input tensor to the finetuning part of the model should be connected to the pretrained model. I have treid multiple variations on this including trying a functional model yet I keep getting this error. Following is my model and parameter dictionary
Following is a Traceback