Open ll553664391 opened 3 years ago
Use custom-defined Hardswish instead of the nn.Hardswish. You can find the Hardswish function in yolov5/utils/activations.py, and then, before exporting into onnx model, plz insert this code for k, m in model.named_modules(): m._non_persistent_buffers_set = set() if isinstance(m, models.common.Conv) and isinstance(m.act, nn.Hardswish): m.act = Hardswish()
Can you help me solve this problem
RuntimeError: Exporting the operator hardswish to ONNX opset version 11 is not supported. Please open a bug to request ONNX export support for the missing operator.