Not able to save the model after training on local dataset.

#1
by AbdulRahmaan - opened

Tried saving with .h5 as well as the .pb extension.
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[21], line 1
----> 1 model.save('mirnet.h5')

File ~\anaconda3\envs\tf\lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb

File ~\anaconda3\envs\tf\lib\site-packages\keras\utils\generic_utils.py:545, in serialize_keras_object(instance)
543 raise e
544 serialization_config = {}
--> 545 for key, item in config.items():
546 if isinstance(item, str):
547 serialization_config[key] = item

AttributeError: 'NoneType' object has no attribute 'items`

Are you trying to train and save it locally? Also, give me some more info to get to understand the problem better.

Yes, I am saving it locally

I used the mirnet model on the keras website, with my own dataset consisting of QR codes. Didn't change anything in the code. It trained and predicts correctly too.
I get the error message here:
model.save('mirnet.h5')

AbdulRahmaan changed discussion status to closed
AbdulRahmaan changed discussion status to open

Please let me know if you need anything else.

I can share the notebook also

I feel you should open an issue on the GitHub link of mirnet or otherwise ask Google or ChatGPT for assistance regarding this error. Because this error is not due to my hugging face space or something.

ok, Thank you

AbdulRahmaan changed discussion status to closed

Sign up or log in to comment