-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Hello,
I tried training image recognition AI using the code:
from imageai.Classification.Custom import ClassificationModelTrainer
model_trainer = ClassificationModelTrainer()
model_trainer.setModelTypeAsResNet50()
model_trainer.setDataDirectory("idenprof")
model_trainer.trainModel(num_objects=10, num_experiments=200, enhance_data=True, batch_size=32, show_network_summary=True)
Received there errors:
C:\Users\Optiplex3070\anaconda3\python.exe "C:\Users\Optiplex3070\Downloads\python training\idenprof-jpg\FirstTraining.py"
C:\Users\Optiplex3070\AppData\Roaming\Python\Python311\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
C:\Users\Optiplex3070\AppData\Roaming\Python\Python311\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None
for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None
.
warnings.warn(msg)
C:\Users\Optiplex3070\AppData\Roaming\Python\Python311\site-packages\torchvision\models\inception.py:43: FutureWarning: The default weight initialization of inception_v3 will be changed in future releases of torchvision. If you wish to keep the old behavior (which leads to long initialization times due to scipy/scipy#11299), please set init_weights=True.
warnings.warn(
Traceback (most recent call last):
File "C:\Users\Optiplex3070\Downloads\python training\idenprof-jpg\FirstTraining.py", line 6, in
model_trainer.trainModel(num_objects=10, num_experiments=200, enhance_data=True, batch_size=32, show_network_summary=True)
TypeError: ClassificationModelTrainer.trainModel() got an unexpected keyword argument 'num_objects'