Open uveshz opened 1 year ago
For this particular error I reinstalled the libraries with specific versions opencv-python==4.6.0.66 tensorflow==2.10.1 imageio==2.23.0 matplotlib==3.6.2 gdown==4.6.0 as per video instructions. and write code as model.load_weights('./models/checkpoint') ## "." is missing
For this particular error I reinstalled the libraries with specific versions opencv-python==4.6.0.66 tensorflow==2.10.1 imageio==2.23.0 matplotlib==3.6.2 gdown==4.6.0 as per video instructions. and write code as model.load_weights('./models/checkpoint') ## "." is missing
Thank you so much . @RonakTawde . "Could you please share the achieved accuracy for this model?
ValueError Traceback (most recent call last) Cell In[86], line 1 ----> 1 model.load_weights('models/checkpoint')
File ~\AppData\Local\Programs\Python\Python311\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_tbFile ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\optimizers\optimizer.py:147, in _BaseOptimizer._create_or_restore_slot_variable(self, kwargs) 146 def _create_or_restore_slot_variable(self, kwargs): --> 147 raise ValueError( 148 "You are trying to restore a checkpoint from a legacy Keras " 149 "optimizer into a v2.11+ Optimizer, which can cause " 150 "errors. Please update the optimizer referenced in your code " 151 "to be an instance of " 152 "
tf.keras.optimizers.legacy.Optimizer
, e.g.: " 153 f"tf.keras.optimizers.legacy.{self.__class__.__name__}
." 154 )ValueError: You are trying to restore a checkpoint from a legacy Keras optimizer into a v2.11+ Optimizer, which can cause errors. Please update the optimizer referenced in your code to be an instance of
tf.keras.optimizers.legacy.Optimizer
, e.g.:tf.keras.optimizers.legacy.Adam
.