Closed theoparis closed 4 years ago
Also, it looks like brain.js added their own support for gpu.js with brain.NeuralNetworkGPU() but idk why this doesn't work still
You cannot use network.train
. Network is a javascript object and gpu.js runs on a GPU. GPU is totally different than a CPU. You can only use arrays/numbers and manipulate those. Hence, brain.js has to provide its own support for GPU based training and there's a lot left to reach that goal.
Oh, ok.
The GPU APIs were originally made only for parallel heavy computation and graphics. It isn't really made to fo normal work. The only reason why graphics cards are faster is because they do simple tasks in parallel not because they are superfast. If that was the case, we would have been able to use a GPU as a CPU.
What is wrong?
It gives this error and im not sure why: gpu-browser.min.js:14 Uncaught Error: unhandled type "ObjectExpression" at FunctionTracer.scan (gpu-browser.min.js:14)
Where does it happen?
Seems to be coming from this line
train(trainingData)
How do we replicate the issue?
use my code with brain.js and gpu.js in the browser
How important is this (1-5)?
1-2
Expected behavior (i.e. solution)
Should have trained the netwrok.
Other Comments