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
+5 -5
View File
@@ -1,6 +1,6 @@
#include "cenet/layers/dense.hpp"
#include "cenet/loss/mse.hpp"
#include "cenet/math/tensor_fwd.hpp"
#include "tulip/tensor_fwd.hpp"
#include <cenet/cenet.hpp>
#include <cstddef>
@@ -11,7 +11,7 @@
static std::uniform_real_distribution<> dist(-1, 1);
int main(void) {
static cenet::math::matrix<cenet::math::inline_storage<float>, 1, 1> s_trainData[4] = {};
static tulip::matrix<tulip::inline_storage<float>, 1, 1> s_trainData[4] = {};
for (std::size_t i = 0; i < 4; ++i) {
const bool x0 = (i & 1U) != 0;
const bool x1 = (i & 2U) != 0;
@@ -20,7 +20,7 @@ int main(void) {
}
// network net;
using network_type = cenet::network<cenet::math::matrix<cenet::math::inline_storage<float>, 1, 2>,
using network_type = cenet::network<tulip::matrix<tulip::inline_storage<float>, 1, 2>,
cenet::layers::dense<2>,
cenet::layers::sigmoid,
cenet::layers::dense<1>,
@@ -45,7 +45,7 @@ int main(void) {
learningState.reset();
for (std::size_t i = 0; i < 4; ++i) {
cenet::math::matrix<cenet::math::inline_storage<float>, 1, 2> xs;
tulip::matrix<tulip::inline_storage<float>, 1, 2> xs;
xs.coeff(0) = static_cast<float>(i & 1);
xs.coeff(1) = static_cast<float>(i > 1);
@@ -60,7 +60,7 @@ int main(void) {
double acc = 0.0;
for (std::size_t i = 0; i < 4; ++i) {
cenet::math::matrix<cenet::math::inline_storage<float>, 1, 2> xs;
tulip::matrix<tulip::inline_storage<float>, 1, 2> xs;
xs.coeff(0) = static_cast<float>(i & 1);
xs.coeff(1) = static_cast<float>(i > 1);