refactor: restructure the project
This commit is contained in:
+2
-3
@@ -1,7 +1,6 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cenet/nn.hpp>
|
||||
#include <cenet/tensor.hpp>
|
||||
#include <cenet/cenet.hpp>
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
@@ -12,7 +11,7 @@
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
using network_type = cenet::nn<cenet::tensor_input<1, 28, 28>,
|
||||
using network_type = cenet::network<cenet::tensor_input<1, 28, 28>,
|
||||
cenet::conv2d_layer<8, 3, 1, 1>,
|
||||
cenet::relu_layer,
|
||||
cenet::maxpool_layer<>,
|
||||
|
||||
+2
-7
@@ -1,14 +1,9 @@
|
||||
#include <cenet/nn.hpp>
|
||||
#include <cmath>
|
||||
#include <cenet/cenet.hpp>
|
||||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
static double sigmoid(double input) {
|
||||
return 1 / (1 + std::exp(-input));
|
||||
}
|
||||
|
||||
static std::uniform_real_distribution<> dist(-1, 1);
|
||||
|
||||
int main(void) {
|
||||
@@ -20,7 +15,7 @@ int main(void) {
|
||||
};
|
||||
|
||||
// network net;
|
||||
using network_type = cenet::nn<cenet::dense_input<2>,
|
||||
using network_type = cenet::network<cenet::dense_input<2>,
|
||||
cenet::dense_layer<2>,
|
||||
cenet::sigmoid_layer,
|
||||
cenet::dense_layer<1>,
|
||||
|
||||
Reference in New Issue
Block a user