1个不稳定版本
| 0.1.0 | 2019年7月15日 |
|---|
#779 in 机器学习
135KB
3.5K SLoC
[ W. I. P. ]
又一个Rust神经网络框架,即YARNN
受darknet和leaf的启发
它现在能做什么
- 不需要
std(仅对张量分配使用alloc,bump allocator是可以的,因此它可以编译到stm32f4板) - 可用层:
Linear、ReLu、Sigmoid、Softmax(没有反向传播),Conv2d、ZeroPadding2d、MaxPool2d、AvgPool2d(没有反向传播),Flatten - 可用优化器:
Sgd、Adam、RMSProp - 可用损失:
CrossEntropy(没有正向传播),MeanSquareError - 可用后端:
Native、NativeBlas(目前还没有卷积)
它将来能做什么(我希望)
第一阶段
- 使用
WASM在浏览器中运行yarnn的示例 - 在
stm32f4板上运行yarnn的示例 - 完成
AvgPool2d的反向传播 - 添加
Dropout层 - 添加
BatchNorm层 - 具有BLAS支持的卷积
第二阶段
CUDA支持OpenCL支持
第三阶段
DepthwiseConv2d层Conv3d层Deconv2d层k210后端
模型定义示例
use yarnn::model;
use yarnn::layer::*;
use yarnn::layers::*;
model! {
MnistConvModel (h: u32, w: u32, c: u32) {
input_shape: (c, h, w),
layers: {
Conv2d<N, B, O> {
filters: 8
},
ReLu<N, B>,
MaxPool2d<N, B> {
pool: (2, 2)
},
Conv2d<N, B, O> {
filters: 8
},
ReLu<N, B>,
MaxPool2d<N, B> {
pool: (2, 2)
},
Flatten<N, B>,
Linear<N, B, O> {
units: 10
},
Sigmoid<N, B>
}
}
}
欢迎贡献者
依赖项
~775KB
~15K SLoC