NBG generation fails ("Generation does not contain any output") for custom MobileNetV2 on STM32MP257, but succeeds for ST Model Zoo MobileNet
- August 20, 2026
- 1 reply
- 46 views
Board: STM32MP257F-EV1 (also relevant to STM32MP257F-DK)
Tool: ST Edge AI Developer Cloud, ST Edge AI Core 2.2.0
The "Optimize" step (NBG generation) consistently fails with:
"Error while generating optimized file. Generation does not contain any output."
Model details:
- Architecture: torchvision.models.mobilenet_v2(weights=None, num_classes=100)
- Trained from scratch on CIFAR-100 (100 classes), PyTorch 2.5.1+cu121
- Input: 3x224x224, output: 100 classes
- Quantized on-platform to INT8, per-tensor (per-channel disabled)
Attempts (all fail identically):
1. Original export, opset_version=12
2. Simplified via onnx-simplifier (0.4.36) - only reduced redundant Constant nodes (176->108); Conv/Clip/Add/Gemm counts unchanged
3. Re-exported with opset_version=17
4. All used random-value calibration (no .npz calibration dataset provided)
No "Show terminal" or detailed log option appears for this specific error on the Optimize step.
Control test (works fine):
Imported mobilenet_a050_pt_224_qdq_int8_image_classification_imagenet.onnx from ST Model Zoo (MobileNet 0.5, 1000 classes, INT8) through the identical pipeline - NBG succeeded, benchmarked at 4.35 ms on STM32MP257F-EV1.
Question:
What's different about a torchvision-exported MobileNetV2 graph that could cause silent NBG failure? Is there a known list of unsupported ops/patterns for STM32MP2 NBG compilation, or a way to get more detailed compiler diagnostics than the web UI shows? Happy to attach the .onnx file or graph screenshots if useful.
