BrainJS / BrainJS/brain.js

toSVG Size not set correctly

Open
#797 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
14.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

https://media.tenor.com/HACqTtaXr_4AAAPo/bob-dumb.mp4

## _What_ is wrong?

When trying to use toSVG with an hiddenLayers set (even with the default 3) it errors "Uncaught error: Sizes not set correctly at check sizes (to-svg.ts:567:11) at Object.toSVG(to-svg.ts:552:14) at script.js:13:37 (my script I'm using to use brain JS)

## _Where_ does it happen?

When trying to use toSVG on an website.

## _How_ do we replicate the issue?

- Step 1: make an div to use in body
- Step 2: reference script and brain.js
- Step 3: go to script and set up a basic XOR train and manually set the hidden layers
- Step 4: Open up index HTML and look at console

## Expected behavior (i.e. solution)

It draws the nureal network SVG like how it does with no set input.

## Version information

### Nodejs:Commit 63ab1ce

### Browser:Commit 63ab1ce

### Brain.js: Commit 63ab1ce

## _How_ important is this (1-5)?

4

## Other Comments

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.