• Hardware RTX3090
• Network Type unet/resnet
• TLT Version
Configuration of the TAO Toolkit Instance
dockers: [‘nvidia/tao/tao-toolkit-tf’, ‘nvidia/tao/tao-toolkit-pyt’, ‘nvidia/tao/tao-toolkit-lm’]
format_version: 2.0
toolkit_version: 3.22.02
published_date: 02/28/2022
• Training spec file (see blow…)
• How to reproduce the issue ?
After completing retraining of the pruned model, the performance numbers are
“{‘foreground’: {‘precision’: 0.9996697, ‘Recall’: 0.9997607, ‘F1 Score’: 0.999715147331038, ‘iou’: 0.99943054}, ‘background’: {‘precision’: 0.6680363, ‘Recall’: 0.59312135, ‘F1 Score’: 0.6283537780304688, ‘iou’: 0.45810193}}”
BUT AFTER EXPORTING FP32:
“{‘foreground’: {‘precision’: 0.999465, ‘Recall’: 0.9997112, ‘F1 Score’: 0.9995880571368052, ‘iou’: 0.9991765}, ‘background’: {‘precision’: 0.48937297, ‘Recall’: 0.34082818, ‘F1 Score’: 0.4018112926271863, ‘iou’: 0.25141668}}”
These are the commands:
# Retraining using the pruned model as pretrained weights
!tao unet train --gpus=1 --gpu_index=$GPU_INDEX \
-e $SPECS_DIR/unet_retrain_resnet_6S300.txt \
-r $USER_EXPERIMENT_DIR/retrain \
-m $USER_EXPERIMENT_DIR/pruned/model_pruned.tlt \
-n model_retrained \
-k $KEY
unet_retrain_resnet_6S300.txt (1.3 KB)
running evaluate before exporting:
!tao unet evaluate --gpu_index=$GPU_INDEX -e $SPECS_DIR/unet_retrain_resnet_6S300.txt \
-m $USER_EXPERIMENT_DIR/retrain/weights/model_retrained.tlt \
-o $USER_EXPERIMENT_DIR/retrain/ \
-k $KEY
Export to FP32
# Export in FP32 mode.
!tao unet export --gpu_index=$GPU_INDEX -m $USER_EXPERIMENT_DIR/retrain/weights/model_retrained.tlt \
-k $KEY \
-e $SPECS_DIR/unet_retrain_resnet_6S.txt \
-o $USER_EXPERIMENT_DIR/export/tao.6S004C.etlt \
--data_type fp32 \
--engine_file $USER_EXPERIMENT_DIR/export/tao.fp32_6S004C.engine \
--max_batch_size 2 \
--batch_size 1
And evaluate the exported model:
!tao unet evaluate --gpu_index=$GPU_INDEX -e $SPECS_DIR/unet_evaluate_resnet_6S.txt \
-m $USER_EXPERIMENT_DIR/export/tao.fp32_6S004C.engine \
-o $USER_EXPERIMENT_DIR/export/ \
-k $KEY
(Need a new spec file for evaluate because the new maximum batch size is 2):
unet_evaluate_resnet_6S.txt (1.3 KB)
More Stuff:
Retrained Model Evaluate Log.txt (40.3 KB)
Exported FP32 Model Evaluate Log.txt (3.4 KB)
Many Thanks for your help