sayakpaul / ConvNeXt-TF

Includes PyTorch -> Keras model porting code for ConvNeXt family of models with fine-tuning and inference notebooks.
https://tfhub.dev/sayakpaul/collections/convnext/1
Apache License 2.0
100 stars 13 forks source link

I got error when I used your model file "convnext_tf.py" and use trained with callback for model save. Is there model prior save model weight file or error from my side? Need your help and suggestions. Thank you. #6

Closed AIFahim closed 2 years ago

AIFahim commented 2 years ago

2022-03-08_12-02

sayakpaul commented 2 years ago

I need to see the full code to know why this error is coming.

AIFahim commented 2 years ago

Code Link Callback Link

Thanks for your response please check. Thanks.

sayakpaul commented 2 years ago

Please provide a Colab Notebook link that would allow me to reproduce the issue.

AIFahim commented 2 years ago

Colab Notebook Link [Error happen after one epoch end when try to save model weight file] In the output, you will find output exists. You can run all to reproduce the same error. Please look at the following cell for error:

2022-03-08_14-43

sayakpaul commented 2 years ago

It's probably best to open this issue in the Keras repository. There's a similar issue here: https://stackoverflow.com/questions/70739244/valueerror-unable-to-create-dataset-name-already-exists-while-saving-tensorfl.

AIFahim commented 2 years ago

Thanks but I tried with other models but didn't get this error.

sayakpaul commented 2 years ago

I see. Since the model definition itself is a bit contrived it's currently not possible for me to dig deeper. The easiest fix I can suggest is serializing the model as a SavedModel resource rather h5 file.

AIFahim commented 2 years ago

Thanks sayak for your response will check this hope to solve it anyhow. Thanks for your contribution.

uranusx86 commented 1 year ago

The error is caused by missing get_config() and from_config() methods in Class StochasticDepth. See Tensorflow Guide.