Skip to content

NeuralNetworkGPU does not work when using the brain.js package through CDN #747

@Nelias

Description

@Nelias

What is wrong?

NeuralNetworkGPU does not detect the gpu.js when using the brain.js package through CDN.

When this code is exectued:

            const network = new brain.NeuralNetworkGPU({
                activation: 'sigmoid',
                hiddenLayers: [4],
                learningRate: 0.6,
            });

How do we replicate the issue?

brain-js-cdn-gpu

  • Add <script src="https://unpkg.com/brain.js"></script> to your HTML file then try to create the new NeuralNetworkGPU in next <script> tag.

Expected behavior (i.e. solution)

The documentation has to be updated with the CDN gpu.js package or maybe it should somehow link that package from brain.js itself.

Version information

Nodejs:

Browser: Chrome

Brain.js: 2.0.0-beta.4

How important is this (1-5)?

4

Other Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions