You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great stuffs really. I walked through your code a lot, but still not sure how to reload weights to continue training should I terminate in the middle for some reasons.
I edited train.py:
...
if "reload_weight_checkpoint" in self.config.keys() and self.config["reload_weight_checkpoint"]!="":
self.model.load_weights(self.config["reload_weight_checkpoint"])
... right before fit.
--> ERROR:
ValueError Traceback (most recent call last)
in
----> 1 history = trainer.train()
D:\AI\Human_Pose\DeepLabV3-Plus\deeplabv3plus\train.py in train(self)
188
189 if "reload_weight_checkpoint" in self.config.keys() and self.config["reload_weight_checkpoint"]!="":
--> 190 self.model.load_weights(self.config["reload_weight_checkpoint"])
191
192 history = self.model.fit(
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\engine\training.py in load_weights(self, filepath, by_name, skip_mismatch, options)
2220 'load_weights requires h5py when loading weights from HDF5.')
2221 if not self._is_graph_network and not self.built:
-> 2222 raise ValueError(
2223 'Unable to load weights saved in HDF5 format into a subclassed '
2224 'Model which has not created its variables yet. Call the Model '
ValueError: Unable to load weights saved in HDF5 format into a subclassed Model which has not created its variables yet. Call the Model first, then load the weights.
Thanks much.
Steve
The text was updated successfully, but these errors were encountered:
Hi,
Great stuffs really. I walked through your code a lot, but still not sure how to reload weights to continue training should I terminate in the middle for some reasons.
I edited train.py:
...
if "reload_weight_checkpoint" in self.config.keys() and self.config["reload_weight_checkpoint"]!="":
self.model.load_weights(self.config["reload_weight_checkpoint"])
... right before fit.
--> ERROR:
ValueError Traceback (most recent call last)
in
----> 1 history = trainer.train()
D:\AI\Human_Pose\DeepLabV3-Plus\deeplabv3plus\train.py in train(self)
188
189 if "reload_weight_checkpoint" in self.config.keys() and self.config["reload_weight_checkpoint"]!="":
--> 190 self.model.load_weights(self.config["reload_weight_checkpoint"])
191
192 history = self.model.fit(
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\engine\training.py in load_weights(self, filepath, by_name, skip_mismatch, options)
2220 '
load_weights
requires h5py when loading weights from HDF5.')2221 if not self._is_graph_network and not self.built:
-> 2222 raise ValueError(
2223 'Unable to load weights saved in HDF5 format into a subclassed '
2224 'Model which has not created its variables yet. Call the Model '
ValueError: Unable to load weights saved in HDF5 format into a subclassed Model which has not created its variables yet. Call the Model first, then load the weights.
Thanks much.
Steve
The text was updated successfully, but these errors were encountered: