We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how do you convert my model to onnxruntime? please help me to resolve this problem!
The text was updated successfully, but these errors were encountered:
from models.unet import UNet import torch use_cuda = torch.cuda.is_available() device = torch.device('cuda' if use_cuda else 'cpu') model = UNet().to(device) model_path = r"D:\Work\doc\RIAD\best.pt" export_path = r"D:\Work\doc\RIAD\RIAD_model_320.onnx" check_point = torch.load(model_path, map_location=device) model.load_state_dict(check_point['model']) inputs = torch.randn(1, 3, 320, 320)
if name == 'main': torch.onnx.export( model, inputs, export_path, opset_version=12, do_constant_folding=True, input_names=['input'], output_names=['output'], dynamic_axes=None )
Sorry, something went wrong.
No branches or pull requests
how do you convert my model to onnxruntime?
please help me to resolve this problem!
The text was updated successfully, but these errors were encountered: