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
hi,
i am new to learning AI/ML using imageai, tensorflow etc. I am testing custom training using transfer learning as i have 5 images only ( 3 for train and 2 for test), i get below error. what does this mean really?
below is my system settings:
raspberry Pi OS 64 bullseye
Keras 2.4.3
Keras-Preprocessing 1.1.2
python 3.7.7
My code - same error with resnet50_coco_best_v2.1.0.h5 , resnet50_imagenet_tf.2.0.h5:
Error: (virtenv3.7) pi@pi:~/ml/detection $ python customtrain.py Traceback (most recent call last): File "customtrain.py", line 5, in <module> model_trainer.trainModel(num_objects=2, num_experiments=10, enhance_data=True, batch_size=2, show_network_summary=True, transfer_from_model="resnet50_coco_best_v2.0.1.h5", initial_num_objects=1000) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/imageai/Classification/Custom/__init__.py", line 225, in trainModel include_top=False, pooling="avg") File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/applications/resnet.py", line 472, in ResNet50 input_tensor, input_shape, pooling, classes, **kwargs) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/applications/resnet.py", line 221, in ResNet model.load_weights(weights) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 2234, in load_weights hdf5_format.load_weights_from_hdf5_group(f, self.layers) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 688, in load_weights_from_hdf5_group ' layers.') ValueError: You are trying to load a weight file containing 116 layers into a model with 106 layers. (virtenv3.7) pi@pi:~/ml/detection $
The text was updated successfully, but these errors were encountered:
changed to using DetectionModelTrainer instead of Classification and used yolo model which solved the issue. Not sure why
`from imageai.Detection.Custom import DetectionModelTrainer
hi,
i am new to learning AI/ML using imageai, tensorflow etc. I am testing custom training using transfer learning as i have 5 images only ( 3 for train and 2 for test), i get below error. what does this mean really?
below is my system settings:
raspberry Pi OS 64 bullseye
Keras 2.4.3
Keras-Preprocessing 1.1.2
python 3.7.7
My code - same error with resnet50_coco_best_v2.1.0.h5 , resnet50_imagenet_tf.2.0.h5:
Error:
(virtenv3.7) pi@pi:~/ml/detection $ python customtrain.py Traceback (most recent call last): File "customtrain.py", line 5, in <module> model_trainer.trainModel(num_objects=2, num_experiments=10, enhance_data=True, batch_size=2, show_network_summary=True, transfer_from_model="resnet50_coco_best_v2.0.1.h5", initial_num_objects=1000) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/imageai/Classification/Custom/__init__.py", line 225, in trainModel include_top=False, pooling="avg") File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/applications/resnet.py", line 472, in ResNet50 input_tensor, input_shape, pooling, classes, **kwargs) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/applications/resnet.py", line 221, in ResNet model.load_weights(weights) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 2234, in load_weights hdf5_format.load_weights_from_hdf5_group(f, self.layers) File "/home/pi/virtenv3.7/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 688, in load_weights_from_hdf5_group ' layers.') ValueError: You are trying to load a weight file containing 116 layers into a model with 106 layers. (virtenv3.7) pi@pi:~/ml/detection $
The text was updated successfully, but these errors were encountered: