GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - UndefinedCpp/bpnn.js: BP神经网络的javascript实现

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
README.md
README.md
 
 
bpnn.d.ts
bpnn.d.ts
 
 
bpnn.js
bpnn.js
 
 
bpnn.test.js
bpnn.test.js
 
 

Repository files navigation

bpnn.js

BP神经网络的javascript实现

使用

// 1. 导入模块 Import the module
const bpnn = require('path/to/bpnn.js');
// 2. 准备训练样本 / Prepare training data
//    这里是一个训练进位的demo / This is a demo of learning to carry in in addition
//    i 是输入数据集,o 是预期输出 / 'i' is input and 'o' is expected output
const i = [
    [0.5, 0.2], [0.9, 0.8],
    [0.5, 0.2], [0, 0.2],
    [0.9, 0], [0.2, 0.6],
    [0.7, 0.4], [0.1, 0.4],
    [0.2, 0.4], [0.5, 0.7]
];
const o = [
    [0], [1], [0],
    [0], [0], [0],
    [1], [0], [0],
    [1]
];
// 3. 创建网络 / Create instance
const opt = { layers: [2, 4, 4, 1] };
const instance = new bpnn.Network(opt);
// 4. 训练网络 / Train the network
instance.train(i, o);
// 5. 预测 / Predict
console.assert(instance.predict([0.3, 0.8])[0] > 0.8);  // true

About

BP神经网络的javascript实现

Topics

bpnetworkbpnnjavascriptlightweightneural-network

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.