keras_to_tensorflow icon indicating copy to clipboard operation
keras_to_tensorflow copied to clipboard

value error unknown layer

Open ArunaKote opened this issue 4 years ago • 1 comments

while converting got error as ValueError('Unknown ' + printable_module_name + ': ' + class_name) ValueError: Unknown layer: BatchNorm

ArunaKote avatar Aug 25 '21 05:08 ArunaKote

i added custom_objects to load model as model = keras.models.load_model(input_model_path, compile=False,custom_objects={'BatchNorm': tf.keras.layers.BatchNormalization}) .But got error as Mask-RCNN-TF2-master/mrcnn/model.py", line 857, in # Reshape to [batch, anchors, 2] NameError: name 'tf' is not defined

ArunaKote avatar Aug 25 '21 12:08 ArunaKote