refactor: remove input.hpp
This commit is contained in:
+3
-3
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user