question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NeuralNetworkGPU: OffscreenCanvas is not defined

See original GitHub issue

me at 10pm

What is wrong?

When trying to train a NeuralNetworkGPU, throws error ReferenceError: OffscreenCanvas is not defined

Where does it happen?

Trying to train a NeuralNetworkGPU, 42 inputs, 7 outputs with config { iterations: 2000, learningRate: 0.3 }

How do we replicate the issue?

  • Create a new NeuralNetworkGPU
  • Train the neural network using any data

Expected behavior (i.e. solution)

The neural network trains properly

Version information

Nodejs: 17.5.0

Browser: N/A

Brain.js: 2.0.0-beta.4

How important is this (1-5)?

4: neural network training using a gpu just does not work (although cpu training still works)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
proxnullcommented, Feb 28, 2022

npm i gpu.js@2.11.4

0reactions
robertleeplummerjrcommented, Mar 29, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox 72.0 error: "OffscreenCanvas is not defined" · Issue #137
Hello! I've been using Spector.js in Firefox for over a year with great results. However, today I noticed that the "Debug with Spector" ......
Read more >
Offscreen canvas issue - document is not defined - Bugs
I'm running my scene in an OffscreenCanvas worker where document is indeed not defined. I noticed these changes came in with these commits:....
Read more >
Offscreencanvas illegal constructor - Stack Overflow
In about:config, set gfx.offscreencanvas.enabled to true. Just checked in my Firefox (44) on Ubuntu - works fine.
Read more >
OffscreenCanvas() - Web APIs - MDN Web Docs
The OffscreenCanvas() constructor returns a newly instantiated OffscreenCanvas object.
Read more >
How to check the OffScreenCanvas is supported by the ...
This operator returns 'undefined' if an object does not exist. The OffscreenCanvas object is compared with the 'undefined' string to see if it ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found