bonlime / keras-deeplab-v3-plus

Keras implementation of Deeplab v3+ with pretrained weights
MIT License
1.36k stars 428 forks source link

Can't save h5 model #82

Closed eejackliu closed 5 years ago

eejackliu commented 5 years ago

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