In get_backbone() functions.
with this config the code run OK.
My problem is when i try to use some pre-trained model.
Using :
backbone=tf.keras.models.load_model('cls_model/model.h5', compile=False)
I am getting the follow erro :
tensorflow.python.framework.errors_impl.InvalidArgumentError: required broadcastable shapes
[[node gradient_tape/RetinaNetLoss/SelectV2_2 (defined at /vitor/Retina_Net/RetinaNetModel.py:147) ]] [Op:__inference_train_function_23583]
Errors may have originated from an input operation.
Input Source operations connected to node gradient_tape/RetinaNetLoss/SelectV2_2:
RetinaNetLoss/Equal_2 (defined at /vitor/Retina_Net/RetinaNetLosses.py:72)
Function call stack:
train_function
My input shape of my trained model is
input_shape=[512,512, 3]
I am trying to change my backend from ResNet50 to DeseNet121. I could change the beckend without problems doing :
In get_backbone() functions. with this config the code run OK.
My problem is when i try to use some pre-trained model. Using :
backbone=tf.keras.models.load_model('cls_model/model.h5', compile=False)
I am getting the follow erro :My input shape of my trained model is
input_shape=[512,512, 3]