Initial implementation of tensor working compiling

This commit is contained in:
Alejandro Saucedo 2021-03-06 17:25:35 +00:00
parent b81896a780
commit ad18c2e546
12 changed files with 417 additions and 210 deletions

View file

@ -17,19 +17,19 @@ int main()
kp::Manager mgr;
std::shared_ptr<kp::Tensor> xI = mgr.tensor({ 0, 1, 1, 1, 1 });
std::shared_ptr<kp::Tensor> xJ = mgr.tensor({ 0, 0, 0, 1, 1 });
auto xI = mgr.tensor<float>({ 0, 1, 1, 1, 1 });
auto xJ = mgr.tensor<float>({ 0, 0, 0, 1, 1 });
std::shared_ptr<kp::Tensor> y = mgr.tensor({ 0, 0, 0, 1, 1 });
auto y = mgr.tensor<float>({ 0, 0, 0, 1, 1 });
std::shared_ptr<kp::Tensor> wIn = mgr.tensor({ 0.001, 0.001 });
std::shared_ptr<kp::Tensor> wOutI = mgr.tensor({ 0, 0, 0, 0, 0 });
std::shared_ptr<kp::Tensor> wOutJ = mgr.tensor({ 0, 0, 0, 0, 0 });
auto wIn = mgr.tensor<float>({ 0.001, 0.001 });
auto wOutI = mgr.tensor<float>({ 0, 0, 0, 0, 0 });
auto wOutJ = mgr.tensor<float>({ 0, 0, 0, 0, 0 });
std::shared_ptr<kp::Tensor> bIn = mgr.tensor({ 0 });
std::shared_ptr<kp::Tensor> bOut = mgr.tensor({ 0, 0, 0, 0, 0 });
auto bIn = mgr.tensor<float>({ 0 });
auto bOut = mgr.tensor<float>({ 0, 0, 0, 0, 0 });
std::shared_ptr<kp::Tensor> lOut = mgr.tensor({ 0, 0, 0, 0, 0 });
auto lOut = mgr.tensor<float>({ 0, 0, 0, 0, 0 });
std::vector<std::shared_ptr<kp::Tensor>> params = { xI, xJ, y,
wIn, wOutI, wOutJ,