File tree Expand file tree Collapse file tree 5 files changed +12
-13
lines changed
version_converter/adapters Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -97,4 +97,3 @@ test_report
9797.mypy_cache
9898virtualenv
9999venv
100-
Original file line number Diff line number Diff line change @@ -1280,7 +1280,7 @@ void convTransposeShapeInference(InferenceContext& ctx) {
12801280 }
12811281 int64_t total_pad = residual == 0 ? kernel_shape[i] - stride : kernel_shape[i] - residual;
12821282 if (total_pad < 0 )
1283- total_pad = 0 ;
1283+ total_pad = 0 ;
12841284 int64_t half_pad_small = total_pad >> 1 ;
12851285 int64_t half_pad_big = total_pad - half_pad_small;
12861286 if (auto_pad_attr->s () == " SAME_UPPER" ) {
Original file line number Diff line number Diff line change 77namespace ONNX_NAMESPACE { namespace version_conversion {
88
99struct BatchNormalization_8_9 final : public Adapter {
10- explicit BatchNormalization_8_9 ()
10+ explicit BatchNormalization_8_9 ()
1111 : Adapter(" BatchNormalization" , OpSetID(8 ), OpSetID(9 )) {
1212 }
13-
13+
1414 void adapt_batch_normalization_8_9 (std::shared_ptr<Graph>, Node* node) const {
15-
15+
1616 Symbol spatial = Symbol (" spatial" );
1717 if (node->hasAttribute (spatial)) {
1818 if (node->i (spatial) == 1 ) {
@@ -28,4 +28,4 @@ struct BatchNormalization_8_9 final : public Adapter {
2828 }
2929};
3030
31- }} // namespace ONNX_NAMESPACE::version_conversion
31+ }} // namespace ONNX_NAMESPACE::version_conversion
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ struct Scan_8_9 final : public Adapter {
1111 }
1212
1313 void adapt_scan_8_9 (std::shared_ptr<Graph>, Node* node) const {
14-
14+
1515 const std::vector<Value*> inputs (node->inputs ().vec ());
1616 const std::vector<Value*> outputs (node->outputs ().vec ());
1717
@@ -31,7 +31,7 @@ struct Scan_8_9 final : public Adapter {
3131 if (inputs[0 ]->uniqueName () != " " ) {
3232 ONNX_ASSERT (" Unsupported conversion to opset 9" );
3333 }
34-
34+
3535 for (Value* input : inputs) {
3636 if (!input->sizes ().empty ()) {
3737 std::vector<Dimension> new_sizes (input->sizes ().begin ()+1 , input->sizes ().end ());
@@ -45,7 +45,7 @@ struct Scan_8_9 final : public Adapter {
4545 std::vector<Dimension> new_sizes (output->sizes ().begin ()+1 , output->sizes ().end ());
4646 output->setSizes (new_sizes);
4747 }
48- }
48+ }
4949 }
5050
5151 void adapt (std::shared_ptr<Graph> graph, Node* node) const override {
@@ -54,4 +54,4 @@ struct Scan_8_9 final : public Adapter {
5454
5555};
5656
57- }} // namespace ONNX_NAMESPACE::version_conversion
57+ }} // namespace ONNX_NAMESPACE::version_conversion
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ struct Upsample_8_9 final: public Adapter {
1010 explicit Upsample_8_9 () : Adapter(" Upsample" , OpSetID(8 ), OpSetID(9 )) {}
1111
1212 void adapt_upsample_8_9 (std::shared_ptr<Graph> graph, Node* node) const {
13-
13+
1414 Symbol input_dirs = Symbol (" scales" );
1515 int dim = (int )(node->fs (kscales).size ());
1616 Tensor t;
@@ -22,7 +22,7 @@ struct Upsample_8_9 final: public Adapter {
2222 for (double scale : node->fs (kscales)) {
2323 data.emplace_back ((float )scale);
2424 }
25-
25+
2626 Value* v = graph->addInitializerAndInput (t, " scales" );
2727 std::vector<Dimension> new_sizes {Dimension (dim)};
2828 v->setSizes (new_sizes);
@@ -36,4 +36,4 @@ struct Upsample_8_9 final: public Adapter {
3636 }
3737};
3838
39- }} // namespace ONNX_NAMESPACE::version_conversion
39+ }} // namespace ONNX_NAMESPACE::version_conversion
You can’t perform that action at this time.
0 commit comments