Giter Site home page Giter Site logo

train-stream's People

Contributors

robertleeplummerjr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

train-stream's Issues

train-stream does not support the Recurrent class

I tried to configure a Recurrent network to use train-stream, but ran into the following error:

one-brain-1  | node:internal/event_target:1037
one-brain-1  |   process.nextTick(() => { throw err; });
one-brain-1  |                            ^
one-brain-1  | 
one-brain-1  | TypeError [Error]: neuralNetwork.updateTrainingOptions is not a function
one-brain-1  |     at new TrainStream (/one/node_modules/train-stream/dist/index.js:41:23)
one-brain-1  |     at MessagePort.<anonymous> (file:///one/src/encoder.js:57:29)
one-brain-1  |     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
one-brain-1  |     at exports.emitMessage (node:internal/per_context/messageport:23:28)
one-brain-1  | Emitted 'error' event on Worker instance at:
one-brain-1  |     at [kOnErrorMessage] (node:internal/worker:326:10)
one-brain-1  |     at [kOnMessage] (node:internal/worker:337:37)
one-brain-1  |     at MessagePort.<anonymous> (node:internal/worker:232:57)
one-brain-1  |     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
one-brain-1  |     at exports.emitMessage (node:internal/per_context/messageport:23:28)
one-brain-1  | 
one-brain-1  | Node.js v20.3.1

I was unsure if this was a known issue. The docs say nothing about supporting the Recurrent class, nor do I even think the class is ready, in vanilla Brain.js? I'm not sure, but I've struggled to make one of these networks work in any environment.

Network trained with train-stream cannot be exported to JSON

When I instantiate a GRU/LSTM network, I can use the .toJSON() method without issue. When I train with vanilla Brain.js, I can also export without issue.

When I train with train-stream, the network cannot be exported. There are two errors I keep running into.

This one happens while running in the main thread:

one-brain-1  | RangeError: Maximum call stack size exceeded
one-brain-1  |     at GRU.toJSON (/one/node_modules/brain.js/dist/index.js:7632:11)
one-brain-1  |     at JSON.stringify (<anonymous>)
one-brain-1  |     at file:///one/src/encoder.js:79:46

And this one happens in a worker:

one-brain-1   | node:internal/event_target:1037
one-brain-1   |   process.nextTick(() => { throw err; });
one-brain-1   |                            ^
one-brain-1   | 
one-brain-1   | RangeError [Error]: Maximum call stack size exceeded
one-brain-1   |     at GRU.toJSON (/one/node_modules/brain.js/dist/index.js:7632:11)
one-brain-1   |     at JSON.stringify (<anonymous>)
one-brain-1   |     at MessagePort.<anonymous> (file:///one/src/encoder.js:36:50)
one-brain-1   |     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
one-brain-1   |     at exports.emitMessage (node:internal/per_context/messageport:23:28)
one-brain-1   | Emitted 'error' event on Worker instance at:
one-brain-1   |     at [kOnErrorMessage] (node:internal/worker:326:10)
one-brain-1   |     at [kOnMessage] (node:internal/worker:337:37)
one-brain-1   |     at MessagePort.<anonymous> (node:internal/worker:232:57)
one-brain-1   |     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
one-brain-1   |     at exports.emitMessage (node:internal/per_context/messageport:23:28)
one-brain-1   | 
one-brain-1   | Node.js v20.3.1

Node 18 fails with the same error. I'm not sure how to proceed at this point.

On a different note, will this run in the browser? And if not, are there any plans to bring the functionality?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.