Web Analytics

go-torch

⭐ 125 stars Simplified Chinese by Abinesh-Mathivanan

go-torch

go-torch 是一个用纯 Go 从零构建的开源深度学习框架。它提供了一个模块化、类似 PyTorch 的 API,用于构建和训练神经网络,配备了稳定的自动微分引擎。

邮件 - abineshmathivanan31@gmail.com

博客 - https://abinesh-mathivanan.vercel.app/en/posts/post-5/

功能


TUI 仪表盘

alt text


待办事项


先决条件


使用方法

克隆仓库

git clone https://github.com/abinesh-mathivanan/go-torch.git
cd go-torch

安装依赖项

`` bash go mod tidy

执行

运行 mnist 训练文件以测试功能。
bash go run ./cnn_benchmark/go_bench.go
``


基准测试

| 基准详情 | 128x128 | 512x512 | 1024x1024 | |:------------------------------------------|:-------------|:------------|:-------------| | 矩阵乘法 | 510.33 µs | 13.54 ms | 130.50 ms | | 元素逐一相加 | 71.72 µs | 1.29 ms | 4.13 ms | | 元素逐一相乘 | 47.83 µs | 1.63 ms | 3.91 ms | | ReLU 激活 | 121.18 µs | 1.75 ms | 6.45 ms | | 线性层前向传播 (B32,I128,O10) | 71.93 µs | | | | 交叉熵损失 (B32,C10) | 11.16 µs | | | | 完整前后传播 (网络:128-256-10, B32) | 4.02 ms | | |



Star History Chart

--- Tranlated By Open Ai Tx | Last indexed: 2025-12-26 ---