I have use this line to save h5 model
tf.keras.models.save_model(model, 'xxx.h5',include_optimizer=False)
But I got this error : NoneType' object has no attribute 'update'
It seems that tensorflow model.get_config() return None
After search on google , someone said that this is because this line
x = Lambda(lambda xx: tf.compat.v1.image.resize(xx,tf.shape(img_input)[1:3],method='bilinear',align_corners=True))(x)
the resize shape must be a static value like [224,224] not the dynamic value come from img_input. the tensorflow can't save the dynamic graph
I hope this information could help others
I have use this line to save h5 model tf.keras.models.save_model(model, 'xxx.h5',include_optimizer=False) But I got this error : NoneType' object has no attribute 'update' It seems that tensorflow model.get_config() return None After search on google , someone said that this is because this line x = Lambda(lambda xx: tf.compat.v1.image.resize(xx,tf.shape(img_input)[1:3],method='bilinear',align_corners=True))(x) the resize shape must be a static value like [224,224] not the dynamic value come from img_input. the tensorflow can't save the dynamic graph I hope this information could help others