Skip to content

Commit 38b6c44

Browse files
authored
Changes done internally at Facebook (onnx#2035)
1 parent 5c51f0d commit 38b6c44

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,3 @@ test_report
9797
.mypy_cache
9898
virtualenv
9999
venv
100-

onnx/defs/nn/defs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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") {

onnx/version_converter/adapters/batch_normalization_8_9.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
namespace ONNX_NAMESPACE { namespace version_conversion {
88

99
struct 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

onnx/version_converter/adapters/scan_8_9.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

onnx/version_converter/adapters/upsample_8_9.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)