Skip to content

Commit 411263e

Browse files
committed
clang
1 parent 280293b commit 411263e

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

app/Graph/build.hpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#pragma once
2-
#include <functional>
3-
#include <opencv2/opencv.hpp>
42
#include <filesystem>
53
#include <fstream>
4+
#include <functional>
65
#include <iostream>
76
#include <opencv2/opencv.hpp>
87
#include <stdexcept>
@@ -11,27 +10,27 @@
1110

1211
#include "Weights_Reader/reader_weights.hpp"
1312
#include "graph/graph.hpp"
13+
#include "layers/BatchNormalizationLayer.hpp"
14+
#include "layers/BinaryOpLayer.hpp"
15+
#include "layers/ConcatLayer.hpp"
1416
#include "layers/ConvLayer.hpp"
1517
#include "layers/DropOutLayer.hpp"
1618
#include "layers/EWLayer.hpp"
1719
#include "layers/FCLayer.hpp"
1820
#include "layers/FlattenLayer.hpp"
1921
#include "layers/InputLayer.hpp"
22+
#include "layers/MatmulLayer.hpp"
2023
#include "layers/OutputLayer.hpp"
2124
#include "layers/PoolingLayer.hpp"
22-
#include "layers/Tensor.hpp"
23-
#include "layers/ConcatLayer.hpp"
24-
#include "layers/BinaryOpLayer.hpp"
25-
#include "layers/SplitLayer.hpp"
26-
#include "layers/TransposeLayer.hpp"
25+
#include "layers/ReduceLayer.hpp"
2726
#include "layers/ReshapeLayer.hpp"
28-
#include "layers/MatmulLayer.hpp"
2927
#include "layers/SoftmaxLayer.hpp"
30-
#include "layers/ReduceLayer.hpp"
31-
#include "layers/BatchNormalizationLayer.hpp"
28+
#include "layers/SplitLayer.hpp"
29+
#include "layers/Tensor.hpp"
30+
#include "layers/TransposeLayer.hpp"
3231

3332
void build_graph(it_lab_ai::Tensor& input, it_lab_ai::Tensor& output,
3433
const std::string& json_path, bool comments,
3534
bool parallel = false);
36-
void build_graph_linear(it_lab_ai::Tensor& input, it_lab_ai::Tensor& output, bool comments,
37-
bool parallel = false);
35+
void build_graph_linear(it_lab_ai::Tensor& input, it_lab_ai::Tensor& output,
36+
bool comments, bool parallel = false);

app/Graph/graph_build.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ int main(int argc, char* argv[]) {
215215
std::string image_folder;
216216
if (model_name == "alexnet_mnist") {
217217
image_folder = IMAGE28_PATH;
218-
}
219-
else {
218+
} else {
220219
image_folder = IMAGENET_PATH;
221220
}
222221
std::cout << "Using image folder: " << image_folder << std::endl;

include/layers/PoolingLayer.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ PoolingLayerImpl<ValueType>::PoolingLayerImpl(
169169
size_t stride = strides[i];
170170
size_t pad =
171171
pads[i] +
172-
pads[pooling_shape.dims() + i]; // top + bottom èëè left + right
172+
pads[pooling_shape.dims() + i];
173173
size_t dilation = dilations[i];
174174

175175
size_t effective_kernel_size = (kernel_size - 1) * dilation + 1;
@@ -311,7 +311,6 @@ std::vector<ValueType> PoolingLayerImplTBB<ValueType>::run(
311311
int batch_dim = this->inputShape_.dims() > spatial_dims ? 0 : -1;
312312
int channel_dim = this->inputShape_.dims() > spatial_dims + 1 ? 1 : -1;
313313

314-
// Use nested TBB loops
315314
oneapi::tbb::parallel_for(
316315
oneapi::tbb::blocked_range<size_t>(
317316
0, batch_dim >= 0 ? this->outputShape_[batch_dim] : 1),

test/single_layer/test_reshapelayer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ TEST(ReshapeLayerTest, ZeroDimensionIndexOutOfRange) {
134134
std::vector<float> data(6, 1.0f);
135135
Tensor input = make_tensor(data, {2, 3});
136136
Tensor output;
137-
ReshapeLayer layer(true,
138-
{2, 0, 3});
137+
ReshapeLayer layer(true, {2, 0, 3});
139138

140139
std::vector<Tensor> in{input};
141140
std::vector<Tensor> out{output};

0 commit comments

Comments
 (0)