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.
Fixes for interpreter and ONNX export for translation (pytorch#7044)
Fixes for interpreter and ONNX export for translation Address comments
- Loading branch information
James Reed
authored
Apr 28, 2018
1 parent
fc6a846
commit 4667983
Showing
29 changed files
with
276 additions
and
96 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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
graph(%a : Double(3, 1, 5) | ||
%b : Double(4, 1, 8, 5)) { | ||
%3 : Double(4!, 3!, 8!, 5) = aten::expand[size=[4, 3, 8, 5]](%a) | ||
%4 : Double(4!, 3!, 8, 5) = aten::expand[size=[4, 3, 8, 5]](%b) | ||
graph(%a.1 : Double(3, 1, 5) | ||
%b.1 : Double(4, 1, 8, 5)) { | ||
%3 : Double(4!, 3!, 8!, 5) = aten::expand[size=[4, 3, 8, 5]](%a.1) | ||
%4 : Double(4!, 3!, 8, 5) = aten::expand[size=[4, 3, 8, 5]](%b.1) | ||
%2 : Double(4, 3, 8, 5) = aten::add[alpha={1}](%3, %4) | ||
return (%2); | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
graph(%x : Double(2, 2) | ||
%y : Long(4)) { | ||
%2 : Double(2, 4) = aten::index_select[dim=1](%x, %y) | ||
graph(%x.1 : Double(2, 2) | ||
%y.1 : Long(4)) { | ||
%2 : Double(2, 4) = aten::index_select[dim=1](%x.1, %y.1) | ||
return (%2); | ||
} |
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
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
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
19 changes: 19 additions & 0 deletions
19
test/expect/TestScript.test_onnx_export_shape_reshape.expect
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,19 @@ | ||
ModelProto { | ||
producer_name: "pytorch" | ||
domain: "" | ||
doc_string: "" | ||
graph: | ||
GraphProto { | ||
name: "torch-jit-export" | ||
inputs: [{name: "0", type:Tensor dims: 1 2 3}] | ||
outputs: [{name: "4", type:Tensor dims: 5 2 3}] | ||
initializers: [] | ||
nodes: [ | ||
Node {type: "Constant", inputs: [], outputs: [1], attributes: [{ name: 'value', type: tensor, value:TensorProto shape: [3]}]}, | ||
Node {type: "Tile", inputs: [0,1], outputs: [2], attributes: []}, | ||
Node {type: "Shape", inputs: [2], outputs: [3], attributes: []}, | ||
Node {type: "Reshape", inputs: [2,3], outputs: [4], attributes: []} | ||
] | ||
} | ||
opset_import: [OperatorSetIdProto { domain: }], | ||
} |
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
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
Oops, something went wrong.