mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Almost there, feel free to review. these c10 operators are exported to _caffe2 domain. TODO: - [x] let the onnx checker pass - [x] test tensor list as argument - [x] test caffe2 backend and converter - [x] check the c10 schema can be exported to onnx - [x] refactor the test case to share some code - [x] fix the problem in ONNX_ATEN_FALLBACK Pull Request resolved: https://github.com/pytorch/pytorch/pull/18210 Reviewed By: zrphercule Differential Revision: D14600916 Pulled By: houseroad fbshipit-source-id: 2592a75f21098fb6ceb38c5d00ee40e9e01cd144
21 lines
920 B
Plaintext
21 lines
920 B
Plaintext
ModelProto {
|
|
producer_name: "pytorch"
|
|
domain: ""
|
|
doc_string: ""
|
|
graph:
|
|
GraphProto {
|
|
name: "torch-jit-export"
|
|
inputs: [{name: "0", type:Tensor dims: 3 4}]
|
|
outputs: [{name: "5", type:Tensor dims: 0}]
|
|
initializers: []
|
|
nodes: [
|
|
Node {type: "Constant", inputs: [], outputs: [1], attributes: [{ name: 'value', type: tensor, value:TensorProto shape: []}]},
|
|
Node {type: "Less", inputs: [0,1], outputs: [2], attributes: []},
|
|
Node {type: "Cast", inputs: [2], outputs: [3], attributes: [{ name: 'to', type: int, value: 2}]},
|
|
Node {type: "Cast", inputs: [3], outputs: [4], attributes: [{ name: 'to', type: int, value: 2}]},
|
|
Node {type: "ATen", inputs: [0,4], outputs: [5], attributes: [{ name: 'operator', type: string, value: 'index'}]}
|
|
]
|
|
}
|
|
opset_import: [OperatorSetIdProto { domain: }OperatorSetIdProto { domain: org.pytorch.aten}],
|
|
}
|