Skip to content

Commit 820e005

Browse files
authored
correct clang-format (#1468)
1 parent f0c449c commit 820e005

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

examples/cpu/inference/cpp/example-app.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
#include <memory>
44

55
int main(int argc, const char* argv[]) {
6-
torch::jit::script::Module module;
7-
try {
8-
module = torch::jit::load(argv[1]);
9-
}
10-
catch (const c10::Error& e) {
11-
std::cerr << "error loading the model\n";
12-
return -1;
13-
}
6+
torch::jit::script::Module module;
7+
try {
8+
module = torch::jit::load(argv[1]);
9+
} catch (const c10::Error& e) {
10+
std::cerr << "error loading the model\n";
11+
return -1;
12+
}
1413

15-
std::vector<torch::jit::IValue> inputs;
16-
torch::Tensor input = torch::rand({1,3,224,224});
17-
inputs.push_back(input);
14+
std::vector<torch::jit::IValue> inputs;
15+
torch::Tensor input = torch::rand({1, 3, 224, 224});
16+
inputs.push_back(input);
1817

19-
at::Tensor output = module.forward(inputs).toTensor();
20-
std::cout << output.slice(/*dim=*/1, /*start=*/0, /*end=*/5) << std::endl;
18+
at::Tensor output = module.forward(inputs).toTensor();
19+
std::cout << output.slice(/*dim=*/1, /*start=*/0, /*end=*/5) << std::endl;
2120

22-
return 0;
21+
return 0;
2322
}

0 commit comments

Comments
 (0)