You can use tf.layers.Lambda to include all of your non-layer functions in the YOLO network(like tile,cast,etc.), thus they are technically a layer but not functions in the network, and you can write and load weights.h5 files. However, I still don't know how to save the whole network.
Me too,good question!When I run train.py to train yolo network,once epoch finished,it raise error like:
Traceback (most recent call last):
File "train.py", line 95, in
model.save_weights(str(epoch) + "_yolov3_weight.h5")
File ".../anaconda3/envs/tf-2.1/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 1107, in save_weights
hdf5_format.save_weights_to_hdf5_group(f, self.layers)
File ".../anaconda3/envs/tf-2.1/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/hdf5_format.py", line 625, in save_weights_to_hdf5_group
g = f.create_group(layer.name)
File ".../envs/tf-2.1/lib/python3.7/site-packages/h5py/_hl/group.py", line 68, in create_group
gid = h5g.create(self.id, name, lcpl=lcpl, gcpl=gcpl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5g.pyx", line 161, in h5py.h5g.create
ValueError: Unable to create group (name already exists)
Mee too i do not know how to save .h5 who can tell me
Mee too i do not know how to save .h5 who can tell me
can you save as xxx.weights file?,i got many files like this xx.data-00001-of-00002 xx.index xx.chechpoint
Mee too i do not know how to save .h5 who can tell me
you can use model.save(xxxxx.5h)