Skip to main content
Associate III
August 18, 2025
Solved

Problems when fine tuning mobileNetV2 for image classification

  • August 18, 2025
  • 1 reply
  • 708 views

Hello all,

im currently trying to fine tune a mobileNetV2 model that is pretrained on imageNet on my own dataset.
However when im adapting the user_config.yaml i dont know how to switch between mobileNetV2 1.0 and mobileNetV2 1.4 as i would like to see the difference between those versions in inference, accuracy and size.
Heres my code block for the training of the user_config.yaml later used by the stm32ai_main.py script:

training:
model:
name: mobilenet
version: v2
alpha: 0.35
pretrained_weights: imagenet
input_shape: (224, 224, 3)
frozen_layers: None
batch_size: 32
epochs: 100
dropout: 0.3
optimizer:
Adam:
learning_rate: 0.001
callbacks:
ReduceLROnPlateau:
monitor: val_accuracy
factor: 0.5
patience: 10
EarlyStopping:
monitor: val_accuracy
patience: 40

I didnt find any paramter that actually determines if the mobileNetV2 is version 1.0 or 1.4...

Kind regards!

Best answer by Laurent FOLLIOT

Hello,
In the yaml, just change the alpha value from 0.35 to 1.0 or 1.4 for your experiments.
Can you maybe share the .yaml config file you use to check the 2nd issue?

Regards,

 

 

1 reply

Laurent FOLLIOT
Laurent FOLLIOTBest answer
ST Employee
August 18, 2025

Hello,
In the yaml, just change the alpha value from 0.35 to 1.0 or 1.4 for your experiments.
Can you maybe share the .yaml config file you use to check the 2nd issue?

Regards,

 

 

lyannenAuthor
Associate III
August 18, 2025

Ah so the alpha is basically the version of the model. Got it thanks.
And regarding my second issue i had in the post earlier, i fixed that!

Regards!