Skip to content

Commit 1781f91

Browse files
committed
Update doc
1 parent df6cdcf commit 1781f91

167 files changed

Lines changed: 10479 additions & 3294 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.18)
2-
project(NeuZephyr VERSION 0.5 LANGUAGES CUDA CXX)
2+
project(NeuZephyr VERSION 0.6 LANGUAGES CUDA CXX)
33

44
# Find CUDA
55
find_package(CUDAToolkit REQUIRED)

README.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,33 +59,34 @@ NeuZephyr is a lightweight deep learning library developed in C++ with CUDA C, d
5959
### C++ Example Code using `NeuZephyr`
6060

6161
```cpp
62-
#include <iostream>
63-
#include <NeuZephyr/ComputeGraph.cuh>
64-
62+
class SegmentationModel : public Model {
63+
public:
64+
InputNode input{{10,3,1024,1024}}; // Batch initialized directly
65+
InputNode target;
66+
67+
SegmentationModel() : target({10,1,8,1}) {
68+
auto x = Conv2d(&input, 1, 3, 3, 1, 1);
69+
x = ReLU(x);
70+
x = Conv2d(x, 1, 3, 3, 1, 1);
71+
x = AvgPool2d(x, 5, 2);
72+
x = Linear(x, 16);
73+
x = Softmax(x);
74+
BCELoss(x, &target); // Graph termination
75+
}
76+
};
77+
6578
int main() {
66-
// Create a compute graph
67-
graph::ComputeGraph graph;
68-
69-
// Add input nodes
70-
graph.addInput({3, 4}, false, "Input");
71-
graph.addInput({4, 3}, true, "Weight");
72-
graph.addInput({3, 3}, false, "Label");
73-
74-
// Add other nodes
75-
graph.addNode("MatMul", "Input", "Weight", "MatMul");
76-
graph.addNode("ReLU", "MatMul", "", "ReLU");
77-
graph.addNode("MeanSquaredError", "ReLU", "Label");
78-
79-
graph.randomizeAll();
80-
81-
// Perform forward and backward passes
82-
graph.forward();
83-
graph.backward();
84-
std::cout << graph << std::endl; // Print result
85-
86-
// Update weights
87-
opt::SGD optimizer(0.01); // Create optimizer
88-
graph.update(&optimizer); // Update weights
79+
SegmentationModel model;
80+
model.input = load_tensor(...);
81+
model.target = load_labels(...);
82+
83+
opt::Adam optimizer(0.01, 0.9, 0.999);
84+
for(int epoch = 0; epoch < 100; ++epoch) {
85+
model.forward();
86+
model.backward();
87+
model.update(&optimizer);
88+
std::cout << "Loss: " << model.getLoss() << std::endl;
89+
}
8990
}
9091
```
9192

@@ -125,6 +126,10 @@ See the [LICENSE](https://github.com/Mgepahmge/NeuZephyr/blob/main/LICENSE) file
125126

126127
## Changelog
127128

129+
### v0.6 - Model Class & Neural Automation Framework
130+
- Introduced **`Model` base class** enabling declarative model construction via inheritance, with automatic parameter tracking and gradient graph generation.
131+
- Added high-level neural components (`Conv2D`, `MaxPool`, `Linear`) with built-in auto-differentiation, eliminating manual computation graph assembly.
132+
128133
### v0.5 - High-Dimensional Tensor Infrastructure Overhaul
129134
- Upgraded core tensor infrastructure from 2D to **fourth-order tensor** representation, enabling native support for high-dimensional data structures.
130135
- Refactored core tensor modules (e.g., memory allocation, shape propagation) to align with the new four-dimensional paradigm while maintaining backward compatibility.

docs/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@
44

55
NeuZephyr is a lightweight deep learning library developed in C++ with CUDA C, designed to provide efficient GPU acceleration for deep learning model training and inference. Its goal is to help developers quickly implement deep learning models while maintaining an easy-to-use interface.
66

7-
If you're new to NeuZephyr and want to get started quickly, **the best place to begin is the documentation for the `nz::graph::ComputeGraph` class**. The `nz::graph::ComputeGraph` class allows you to define and manipulate the structure of your neural network, making it the foundation for both training and inference.
7+
---
8+
9+
# NeuZephyr Quick Start Guide ✨
810

9-
Once you understand how to use the **nz::graph::ComputeGraph**, you'll be able to easily integrate other features like Tensors, Nodes, Optimizers, and more into your models.
11+
**Core Starting Point**
12+
👉 Begin with the foundational `nz::Model` class documentation! This class enables you to:
13+
‣ 🧱 **Define** neural network architectures
14+
‣ ⚙️ **Manipulate** model structures
15+
‣ 🚂 **Unify** training/inference workflows
1016

11-
For a detailed guide on how to use the `ComputeGraphh` class, please refer to the **`nz::graph::ComputeGraph`** class or its documentation.
17+
**Seamless Expansion Path**
18+
After mastering `nz::Model`, effortlessly integrate:
19+
20+
├ 🔥 **Tensors** - Data representation
21+
├ 🧠 **Nodes** - Computational units
22+
├ 🎯 **Optimizers** - Learning strategies
23+
└ ...and other advanced features!
1224

1325
---
1426

@@ -137,6 +149,11 @@ See the [LICENSE](https://github.com/Mgepahmge/NeuZephyr/blob/main/LICENSE) file
137149

138150
## Changelog
139151

152+
### v0.6 - Model Class & Neural Automation Framework
153+
- Introduced **`Model` base class** enabling declarative model construction via inheritance, with automatic parameter tracking and gradient graph generation.
154+
- Added high-level neural components (`Conv2D`, `MaxPool`, `Linear`) with built-in auto-differentiation, eliminating manual computation graph assembly.
155+
156+
140157
### v0.5 - High-Dimensional Tensor Infrastructure Overhaul
141158
- Upgraded core tensor infrastructure from 2D to **fourth-order tensor** representation, enabling native support for high-dimensional data structures.
142159
- Refactored core tensor modules (e.g., memory allocation, shape propagation) to align with the new four-dimensional paradigm while maintaining backward compatibility.

0 commit comments

Comments
 (0)