https://github.com/andreimoraru123/venus
Deep Learning Framework for C++23
https://github.com/andreimoraru123/venus
cpp23 deep-learning neural-networks ranges tensors
Last synced: 3 months ago
JSON representation
Deep Learning Framework for C++23
- Host: GitHub
- URL: https://github.com/andreimoraru123/venus
- Owner: AndreiMoraru123
- License: bsl-1.0
- Created: 2025-01-10T06:06:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-07T11:12:29.000Z (4 months ago)
- Last Synced: 2025-09-07T11:37:15.004Z (4 months ago)
- Topics: cpp23, deep-learning, neural-networks, ranges, tensors
- Language: C++
- Homepage:
- Size: 126 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Venus: Zero-Cost Tensors for Modern Deep Learning
### Demo:
```cpp
// demo/tensor_range.cpp
#include "core/tensor/tensor.hpp"
#include
#include
using namespace venus;
auto main() -> int {
auto tensor = Tensor(3, 3); // heap alloc 3x3 Tensor
std::ranges::iota(tensor, 1); // 1, 2, 3, 4, 5, 6, 7, 8, 9
auto pipeline =
tensor |
std::views::filter([](int x) { return x % 2 == 0; }) | // 2, 4, 6, 8
std::views::transform([](int x) { return x * x; }) | // 4, 16, 36, 64
std::views::take(2); // 4, 16
auto result = std::ranges::fold_left(pipeline, 0, std::plus{}); // 20
assert(result == 20);
}
```