Comments (3)
device = 'cpu'
c = torch.randn(1, 3, 256, 256, requires_grad=True).to(device)
s = torch.randn(1, 3, 256, 256, requires_grad=True).to(device)
mask_c = torch.randn(1, 2, 256, 256, requires_grad=True).to(device)
mask_s = torch.randn(1, 2, 256, 256, requires_grad=True).to(device)
diff_c = torch.randn(1, 136, 256, 256, requires_grad=True).to(device)
diff_s = torch.randn(1, 136, 256, 256, requires_grad=True).to(device)
lms_c = torch.randn(1, 68, 2, requires_grad=True).to(device)
lms_s = torch.randn(1, 68, 2, requires_grad=True).to(device)
input = ['c', 's', 'mask_c', 'mask_s', 'diff_c', 'diff_s', 'lms_c', 'lms_s']
output = ['output']
torch.onnx.export(self.solver.G, (c, s, mask_c, mask_s, diff_c, diff_s, lms_c, lms_s), 'model.onnx', verbose=True,
opset_version=15, input_names=input, output_names=output)
无法使用以上代码转换为onnx:
Exporting the operator inverse to ONNX opset version 15 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.
希望可以指教一下如何解决问题。
from elegant.
device = 'cpu' c = torch.randn(1, 3, 256, 256, requires_grad=True).to(device) s = torch.randn(1, 3, 256, 256, requires_grad=True).to(device) mask_c = torch.randn(1, 2, 256, 256, requires_grad=True).to(device) mask_s = torch.randn(1, 2, 256, 256, requires_grad=True).to(device) diff_c = torch.randn(1, 136, 256, 256, requires_grad=True).to(device) diff_s = torch.randn(1, 136, 256, 256, requires_grad=True).to(device) lms_c = torch.randn(1, 68, 2, requires_grad=True).to(device) lms_s = torch.randn(1, 68, 2, requires_grad=True).to(device) input = ['c', 's', 'mask_c', 'mask_s', 'diff_c', 'diff_s', 'lms_c', 'lms_s'] output = ['output'] torch.onnx.export(self.solver.G, (c, s, mask_c, mask_s, diff_c, diff_s, lms_c, lms_s), 'model.onnx', verbose=True, opset_version=15, input_names=input, output_names=output)
Cannot convert to onnx using the above code: Exporting the operator inverse to ONNX opset version 15 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.
Hope you can teach me how to solve the problem.
I don't know about the code but this error "Exporting the operator inverse to ONNX opset version 15 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub " i think can be fixed simply by using pytorch nightly
from elegant.
@Fcucgvhhhvjv Based on the support list listed by pytorch https://pytorch.org/docs/stable/onnx_supported_aten_ops.html, perhaps only replacing the operator will solve the problem
from elegant.
Related Issues (17)
- FileNotFoundError: [Errno 2] No such file or directory: 'EleGANt/faceutils/mask/resnet.pth' HOT 2
- How can I obtain images generated by PGT
- Hi, the result is not good,Not sure what caused it. HOT 1
- train dataset HOT 1
- 输出的结果是被裁剪的 HOT 2
- 请问如何进行多卡训练呢?
- Hello
- Hi there HOT 2
- How can I change the code to recognize two person? HOT 1
- Are the pgt reuslts normal?
- Does the model image only support 361X361, does it not support resolution 512X512 or 1024X1024? HOT 1
- Can it only support skin color migration? HOT 1
- 请问交互的如何使用? HOT 1
- 想請問crop函式中up ratio, down ratio跟width ration的設置 及 數值設置的用意 HOT 3
- Fine-tune HOT 1
- Global shade control HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elegant.