RangeError: Source is too large
See original GitHub issueWhat is wrong?
RangeError: Source is too large
Where does it happen?
In the a Neural Network when trying to train a net in GPU mode
How do we replicate the issue?
- Step 1
Create a dummy tanning data set that total around 32k records like below,
{
"input": [
"boston apartments",
"condos for sale in boston",
"marblehead real estate",
"massachusetts real estate"
],
"output": "Condos"
}
- Step 2
Now, Import it and run it like below,
const brain = require('brain.js');
const natural = require('natural')
const jsonfile = require('jsonfile');
const trainingDataSet = require('./sample.json');
const net = new brain.NeuralNetworkGPU();
net.train({trainingDataSet}{ log: (stats) => console.log(stats), iterations: 20000 });
jsonfile.writeFile("./trainedNet.json", net.toJSON());
Expected behavior (i.e. solution)
Should have run without this error
Version information
Nodejs:
v12.16.1
Browser:
Brain.js:
2.0.0-beta.2
How important is this (1-5)?
5
Other Comments
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Source is too large, multiple Float32Arrays - Stack Overflow
produces an error "Uncaught RangeError: Source is too large". At a glance it looks like it's just a normal Float32Array with 16 elements, ......
Read more >Source is too large" in Chrome dev build (60.0.3100.0) · Issue ...
I can confirm this happens in Version 61.0.3141.7 (Official Build) dev (64-bit) also. On version <=59 works fine. Uncaught RangeError: Source is ......
Read more >RangeError: Source is too large - Ionic Forum
Hi, I'm new to Ionic and Javascript. I have a bluetooth serial application receiving data from a device that it is showed in...
Read more >Source is too large, multiple Float32Arrays-C++ - appsloveworld
Coding example for the question Emscripten Uncaught RangeError: Source is too large, multiple Float32Arrays-C++.
Read more >RangeError: repeat count must be less than infinity - JavaScript
The JavaScript exception "repeat count must be less than infinity" occurs when the String.prototype.repeat() method is used with a count ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
neuralNetworkGPU: net
Doesn’t work. I am getting an error which ask to provide valid neural network.Other thing is that without using GPU but using LSTM, I’m not getting the state info but it create a network.
The original questions mentions a data shape of the following:
This must be broken up, and used with
brain.recurrent.LSTM
for it to work.brain.NeuralNetwork
isn’t compatible with strings.Example of how data should look: