refactor(tulip): move cenet/math/ to tulip/

This commit is contained in:
2026-11-22 12:54:57 +01:00
parent 14292b1d97
commit dea973ddd6
19 changed files with 157 additions and 167 deletions
+4 -4
View File
@@ -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) {