Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing readme example #201

Merged
merged 1 commit into from Feb 10, 2022
Merged

Conversation

codeheart09
Copy link
Contributor

I believe there was a small error in the documentation (look at how the array was flat in the predict()).

If I run the code how it was, I receive the following error:

var _this = _super.call(this, message) || this;
                   ^

ValueError: Error when checking : expected dense_Dense1_input to have shape [null,1] but got array with shape [1,2].
    at new ValueError (.../node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js:10080:28)
    at checkInputData (.../node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js:19373:31)
    at LayersModel.predict (.../node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js:20051:9)
    at Sequential.predict (.../node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js:21555:27)
    at LinearRegression.predict (.../dist/node/linear_model/sgdRegressor.js:204:40)
    at main (.../test/mock/basic-node.mjs:10:18)

So I made the change to what I believe to be the intended way - but let me know if I'm not correct!

:)

@netlify
Copy link

netlify bot commented Feb 9, 2022

✔️ Deploy Preview for scikitjs ready!

🔨 Explore the source changes: c61e634

🔍 Inspect the deploy log: https://app.netlify.com/sites/scikitjs/deploys/6203e14f881bef0008b37110

😎 Browse the preview: https://deploy-preview-201--scikitjs.netlify.app

@dcrescim
Copy link
Collaborator

You're a champion @codeheart09

@dcrescim dcrescim merged commit 43691ed into javascriptdata:main Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants