BrainJS / BrainJS/brain.js

How to add new indexes to my net?

Open
#810 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
14.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

![A GIF or MEME to give some spice of the internet](https://cdn.sisense.com/wp-content/uploads/meme5-370x236.jpg)

## Summary
I will jump to the example and explain later.

### Basic example
Imagine a network like that:
```js
let data = [
["Hello", " ", "World", "!"],
["Lorem", " ", "Ipsum"]
]

let net = new Brain.recurrent.LSTM();

//pre-training
net.train(data);

//post-training
let runData = ["Hello", " ", "Dolor", "!"];

net.train(data.concat(runData)); //My attempt to include "Dolor" to the indexes.

console.log(net.run(runData));
```
It should throw:
```js
Error: unrecognized character "Dolor"
```

### Motivation
My point is to provide a way to add indexes to the model and then update my saved model.

Sorry if this already exists.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.