Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreySorokin7 committed Aug 9, 2024
1 parent aca37ed commit 02b113f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/Accuracy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ execute_process(
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build"
)

set(INCLUDE_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/accuracy_check.hpp")
add_library(ACCLib STATIC ${INCLUDE_HEADERS})
set(INCLUDE_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/acc.hpp")
set(SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/acc.cpp")
add_library(ACCLib STATIC ${INCLUDE_HEADERS} ${SRC_FILES})


set_target_properties(ACCLib PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(ReadLib PROPERTIES LINKER_LANGUAGE CXX)

find_package( OpenCV REQUIRED PATHS "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build" )
include_directories( ${OpenCV_INCLUDE_DIRS} )
Expand Down
2 changes: 2 additions & 0 deletions app/Accuracy/acc.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "acc.hpp"
#include <stdexcept>
2 changes: 1 addition & 1 deletion app/Accuracy/accuracy_check.hpp → app/Accuracy/acc.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/opencv.hpp>
11 changes: 5 additions & 6 deletions app/Accuracy/accuracy_check.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#include "graph/graph.hpp"
#include "acc.hpp"
#include "layers/ConvLayer.hpp"
#include "layers/EWLayer.hpp"
#include "layers/FCLayer.hpp"
#include "layers/InputLayer.hpp"
#include "layers/OutputLayer.hpp"
#include "layers/PoolingLayer.hpp"

#include "accuracy_check.hpp"

using namespace itlab_2023;

int main() {
Expand All @@ -33,7 +32,7 @@ int main() {
c++;
}
}
Shape sh({static_cast<size_t>(Count_pic_), 227, 227, 3});
/*Shape sh({static_cast<size_t>(Count_pic_), 227, 227, 3});
Tensor t = make_tensor<int>(res, sh);
Graph graph(6);
Shape sh1({1, 5, 5, 3});
Expand Down Expand Up @@ -63,8 +62,8 @@ int main() {
graph.setOutput(a5, output);
graph.inference();
std::vector<float> tmp = *output.as<float>();
std::vector<float> tmp_output = softmax<float>(*output.as<float>());
for (int i = 0; i < tmp.size(); i++) {
std::cout << tmp[i] << " ";
std::vector<float> tmp_output = softmax<float>(*output.as<float>());*/
for (int i = 0; i < res.size(); i++) {
std::cout << res[i] << " ";
}
}

0 comments on commit 02b113f

Please sign in to comment.