Skip to content

Commit 02b113f

Browse files
author
AndreySorokin7
committed
fix
1 parent aca37ed commit 02b113f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

app/Accuracy/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ execute_process(
99
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build"
1010
)
1111

12-
set(INCLUDE_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/accuracy_check.hpp")
13-
add_library(ACCLib STATIC ${INCLUDE_HEADERS})
12+
set(INCLUDE_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/acc.hpp")
13+
set(SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/acc.cpp")
14+
add_library(ACCLib STATIC ${INCLUDE_HEADERS} ${SRC_FILES})
1415

15-
16-
set_target_properties(ACCLib PROPERTIES LINKER_LANGUAGE CXX)
16+
set_target_properties(ReadLib PROPERTIES LINKER_LANGUAGE CXX)
1717

1818
find_package( OpenCV REQUIRED PATHS "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build" )
1919
include_directories( ${OpenCV_INCLUDE_DIRS} )

app/Accuracy/acc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "acc.hpp"
2+
#include <stdexcept>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#pragma once
22
#include <iostream>
3-
#include <opencv2/opencv.hpp>
3+
#include <opencv2/opencv.hpp>

app/Accuracy/accuracy_check.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#include "graph/graph.hpp"
2+
#include "acc.hpp"
23
#include "layers/ConvLayer.hpp"
34
#include "layers/EWLayer.hpp"
45
#include "layers/FCLayer.hpp"
56
#include "layers/InputLayer.hpp"
67
#include "layers/OutputLayer.hpp"
78
#include "layers/PoolingLayer.hpp"
89

9-
#include "accuracy_check.hpp"
10-
1110
using namespace itlab_2023;
1211

1312
int main() {
@@ -33,7 +32,7 @@ int main() {
3332
c++;
3433
}
3534
}
36-
Shape sh({static_cast<size_t>(Count_pic_), 227, 227, 3});
35+
/*Shape sh({static_cast<size_t>(Count_pic_), 227, 227, 3});
3736
Tensor t = make_tensor<int>(res, sh);
3837
Graph graph(6);
3938
Shape sh1({1, 5, 5, 3});
@@ -63,8 +62,8 @@ int main() {
6362
graph.setOutput(a5, output);
6463
graph.inference();
6564
std::vector<float> tmp = *output.as<float>();
66-
std::vector<float> tmp_output = softmax<float>(*output.as<float>());
67-
for (int i = 0; i < tmp.size(); i++) {
68-
std::cout << tmp[i] << " ";
65+
std::vector<float> tmp_output = softmax<float>(*output.as<float>());*/
66+
for (int i = 0; i < res.size(); i++) {
67+
std::cout << res[i] << " ";
6968
}
7069
}

0 commit comments

Comments
 (0)