ml-mobileone
ml-mobileone copied to clipboard
export to onnx fail
model = mobileone(num_classes=1000, inference_mode=True, variant="s4")
x = torch.rand(1, 3, 224, 224)
addr = 'mobileonev4_demo.onnx'
torch.onnx.export(model, x, addr,
export_params=True,
do_constant_folding=False,
training=False,
opset_version=11,
verbose=True)
error printed: f"'mode' should be a torch.onnx.TrainingMode enum, but got '{type(mode)}'." TypeError: 'mode' should be a torch.onnx.TrainingMode enum, but got '<class 'bool'>'.