ml-mobileone icon indicating copy to clipboard operation
ml-mobileone copied to clipboard

export to onnx fail

Open carr123 opened this issue 1 year ago • 0 comments

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'>'.

carr123 avatar Apr 25 '23 15:04 carr123