forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend support for exporting reshape to onnx.
Summary: Pull Request resolved: pytorch#16632 Differential Revision: D14020906 Pulled By: ezyang fbshipit-source-id: 168616873044b980145a3554dab942bdec19efb2
- Loading branch information
1 parent
e661dc2
commit 4335aac
Showing
4 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
ir_version: 4 | ||
producer_name: "pytorch" | ||
producer_version: "0.4" | ||
graph { | ||
node { | ||
input: "0" | ||
output: "1" | ||
op_type: "Flatten" | ||
attribute { | ||
name: "axis" | ||
i: 1 | ||
type: INT | ||
} | ||
} | ||
name: "torch-jit-export" | ||
input { | ||
name: "0" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "1" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 1 | ||
} | ||
dim { | ||
dim_value: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
version: 9 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
ir_version: 4 | ||
producer_name: "pytorch" | ||
producer_version: "0.4" | ||
graph { | ||
node { | ||
output: "1" | ||
op_type: "Constant" | ||
attribute { | ||
name: "value" | ||
t { | ||
dims: 3 | ||
dims: 1 | ||
dims: 2 | ||
dims: 1 | ||
data_type: 1 | ||
raw_data: "\220\202l>\204m1?\363\241\210\276\374k\013@\\-\321=\353\234\204\276" | ||
} | ||
type: TENSOR | ||
} | ||
} | ||
node { | ||
input: "1" | ||
output: "2" | ||
op_type: "Shape" | ||
} | ||
node { | ||
input: "0" | ||
input: "2" | ||
output: "3" | ||
op_type: "Reshape" | ||
} | ||
name: "torch-jit-export" | ||
input { | ||
name: "0" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
dim { | ||
dim_value: 3 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "3" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 3 | ||
} | ||
dim { | ||
dim_value: 1 | ||
} | ||
dim { | ||
dim_value: 2 | ||
} | ||
dim { | ||
dim_value: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
version: 9 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters