diff --git a/app/AlexNet/reader_weights_sample.cpp b/app/AlexNet/reader_weights_sample.cpp index 76e62655..4d77c57c 100644 --- a/app/AlexNet/reader_weights_sample.cpp +++ b/app/AlexNet/reader_weights_sample.cpp @@ -15,7 +15,8 @@ int main() { << layer_name << "):" << std::endl; try { - Tensor tensor = create_tensor_from_json(layer_data["weights"], Type::kFloat); + Tensor tensor = + create_tensor_from_json(layer_data["weights"], Type::kFloat); // std::cout << tensor << std::endl; } catch (const std::exception& e) { std::cerr << "Error processing layer " << layer_name << ": " << e.what() diff --git a/app/Graph/graph_build.cpp b/app/Graph/graph_build.cpp index d47a4c66..48577e78 100644 --- a/app/Graph/graph_build.cpp +++ b/app/Graph/graph_build.cpp @@ -1,4 +1,10 @@ +#include +#include +#include +#include + #include "Weights_Reader/reader_weights.hpp" +#include "build.hpp" #include "graph/graph.hpp" #include "layers/ConvLayer.hpp" #include "layers/EWLayer.hpp" @@ -6,11 +12,6 @@ #include "layers/InputLayer.hpp" #include "layers/OutputLayer.hpp" #include "layers/PoolingLayer.hpp" -#include -#include -#include -#include -#include "build.hpp" using namespace itlab_2023; @@ -23,13 +24,15 @@ void build_graph(Tensor input, Tensor output) { for (const auto& layer_data : model_data) { std::string layer_type = layer_data["type"]; - Tensor tensor = create_tensor_from_json(layer_data["weights"], Type::kFloat); + Tensor tensor = + create_tensor_from_json(layer_data["weights"], Type::kFloat); if (layer_type.find("Conv") != std::string::npos) { Shape shape = tensor.get_shape(); Tensor tmp_values = make_tensor(tensor.get_values(), shape); Tensor tmp_bias = make_tensor(tensor.get_bias()); - layers.push_back(std::make_shared(1, 0, 0, tmp_values, tmp_bias)); + layers.push_back( + std::make_shared(1, 0, 0, tmp_values, tmp_bias)); } if (layer_type.find("Dense") != std::string::npos) { diff --git a/app/ReaderImage/reader_img_s.cpp b/app/ReaderImage/reader_img_s.cpp index b370efc6..7c7d804a 100644 --- a/app/ReaderImage/reader_img_s.cpp +++ b/app/ReaderImage/reader_img_s.cpp @@ -1,5 +1,6 @@ -#include "reader_img.hpp" -#include +#include + +#include "reader_img.hpp" using namespace cv; void read(std::string& path) { Mat image = imread(path);