mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
To fix caffe2 model with Copy OP cannot export to onnx model (#37144)
Summary: To fix caffe2 model with Copy OP cannot export to onnx model Pull Request resolved: https://github.com/pytorch/pytorch/pull/37144 Reviewed By: houseroad Differential Revision: D21252421 Pulled By: yinghai fbshipit-source-id: 4f1077188f36b0691d199e418880bbb27f11032d
This commit is contained in:
parent
1bac49f075
commit
6dd1beaaa8
|
|
@ -371,7 +371,8 @@ OnnxExporter::get_renamed_operators() const {
|
|||
{"MaxPool3D", "MaxPool"},
|
||||
{"AveragePool1D", "AveragePool"},
|
||||
{"AveragePool2D", "AveragePool"},
|
||||
{"AveragePool3D", "AveragePool"}};
|
||||
{"AveragePool3D", "AveragePool"},
|
||||
{"Copy", "Identity"}};
|
||||
return kRenamedOperators;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ OPERATOR_SCHEMA(Copy)
|
|||
.NumOutputs(1)
|
||||
.IdenticalTypeAndShape()
|
||||
.InputsCanCrossDevices()
|
||||
.InheritOnnxSchema("Identity")
|
||||
.SetDoc(R"DOC(
|
||||
Copy input tensor into output, potentially across devices.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user