refactor(tulip): move cenet/math/ to tulip/
This commit is contained in:
+4
-4
@@ -15,7 +15,7 @@
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
using network_type = cenet::network<cenet::math::tensor<float, 1, 28, 28>,
|
||||
using network_type = cenet::network<tulip::tensor<float, 1, 28, 28>,
|
||||
cenet::layers::conv2d<8, 3, 1, 1>,
|
||||
cenet::layers::relu,
|
||||
cenet::layers::maxpool<>,
|
||||
@@ -29,14 +29,14 @@ using network_type = cenet::network<cenet::math::tensor<float, 1, 28, 28>,
|
||||
static std::uniform_real_distribution<> dist(-1, 1);
|
||||
|
||||
struct data {
|
||||
cenet::math::tensor<float, 1, 28, 28> xs{};
|
||||
cenet::math::matrix<float, 1, 10> ys{};
|
||||
tulip::tensor<float, 1, 28, 28> xs{};
|
||||
tulip::matrix<float, 1, 10> ys{};
|
||||
};
|
||||
|
||||
using dataset = std::vector<data>;
|
||||
|
||||
template <std::size_t N, typename T>
|
||||
static std::size_t col_largest_idx(const cenet::math::tensor_view<T, N>& col) {
|
||||
static std::size_t col_largest_idx(const tulip::tensor_view<T, N>& col) {
|
||||
std::size_t maxIdx = 0;
|
||||
std::remove_cv_t<T> max = col[0];
|
||||
for (std::size_t i = 1; i < N; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user