- 授权协议: MIT
- 开发语言: C/C++
- 操作系统: 跨平台
- 软件首页: https://github.com/glouw/tinn
- 软件文档: https://github.com/glouw/tinn/blob/master/README.md
- 官方下载: https://github.com/glouw/tinn
软件介绍
Tinn 是一个用 C99 编写的仅有 200 行代码微型神经网络库,无依赖,轻量级。同时支持任意 C++ 编译器进行编译。
#include "Tinn.h"
#include <stdio.h>
#define len(a) ((int) (sizeof(a) / sizeof(*a)))
int main()
{
float in[] = { 0.05, 0.10 };
float tg[] = { 0.01, 0.99 };
/* Two hidden neurons */
const Tinn tinn = xtbuild(len(in), 2, len(tg));
for(int i = 0; i < 1000; i++)
{
float error = xttrain(tinn, in, tg, 0.5);
printf("%.12f\n", error);
}
xtfree(tinn);
return 0;
}
