admin管理员组文章数量:1400566
I trained a tensorflow ConvNeXtTiny model (tf.keras.applications.convnext.ConvNeXtTiny). I am able to train the model without any issues. But when I try to save the model with model.save(my_model, save_format="tf")
I get the following error:
Traceback (most recent call last):
tensorflow-1 | File "training_classifier.py", line 12, in <module>
tensorflow-1 | model.save("my_model", save_format="tf")
tensorflow-1 | File "/usr/local/lib/python3.8/dist-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
tensorflow-1 | raise e.with_traceback(filtered_tb) from None
tensorflow-1 | File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/trackable/trackable_utils.py", line 126, in escape_local_name
tensorflow-1 | return (name.replace(_ESCAPE_CHAR, _ESCAPE_CHAR + _ESCAPE_CHAR).replace(
tensorflow-1 | AttributeError: 'NoneType' object has no attribute 'replace'
I did not make any modifications to the model.
This error occurs while trying to save the model both before and after training.
I don't get the error when I save in the h5 format. I don't get this error with other models of tensorflow like Resnet, EfficientNet, etc, but I get it with all sizes of ConvNeXt.
From what I have understood so far, people have only faced this issue when training custom models.
Is there any modification I can do to avoid this error and save my model in the tf format? This is the only format acceptable for me.
本文标签: tensorflow20Unable to save tensorflow ConvNeXtTiny model in tf format (TF 2130)Stack Overflow
版权声明:本文标题:tensorflow2.0 - Unable to save tensorflow ConvNeXtTiny model in .tf format (TF 2.13.0) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744768243a2624175.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论