refactor: remove input.hpp

This commit is contained in:
2026-10-25 19:21:17 +01:00
parent 471c9c8997
commit fa0418914a
8 changed files with 81 additions and 146 deletions
+3 -3
View File
@@ -11,7 +11,7 @@
#include <random>
#include <vector>
using network_type = cenet::network<cenet::tensor_input<float, 1, 28, 28>,
using network_type = cenet::network<cenet::tensor<float, 1, 28, 28>,
cenet::conv2d_layer<8, 3, 1, 1>,
cenet::relu_layer,
cenet::maxpool_layer<>,
@@ -157,11 +157,11 @@ int main(void) {
const auto& output = mnistNet->feed(validationSet[i].xs);
for (std::size_t j = 0; j < 10; ++j) {
float diff = output.get()[0][j] - validationSet[i].ys[0][j];
float diff = output[0][j] - validationSet[i].ys[0][j];
totalLoss += diff * diff;
}
if (col_largest_idx(output.get()[0]) == col_largest_idx(validationSet[i].ys[0])) ++hits;
if (col_largest_idx(output[0]) == col_largest_idx(validationSet[i].ys[0])) ++hits;
}
currentLoss = totalLoss / static_cast<double>(validationSet.size());