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

[Codelab]: Making Predictions from 2D Data #8245

Closed
kawaii-kitsune opened this issue Apr 12, 2024 · 4 comments
Closed

[Codelab]: Making Predictions from 2D Data #8245

kawaii-kitsune opened this issue Apr 12, 2024 · 4 comments

Comments

@kawaii-kitsune
Copy link

await train(model, data);
Data is not defined
so i did this
const data = new MnistData();
await data.load();
await train(model, data);
which I am not that proud of

@gaikwadrahul8 gaikwadrahul8 self-assigned this Apr 12, 2024
@gaikwadrahul8 gaikwadrahul8 added comp:core type:support user support questions labels Apr 12, 2024
@gaikwadrahul8
Copy link
Contributor

gaikwadrahul8 commented Apr 15, 2024

Hi, @kawaii-kitsune

I apologize for the delayed response and I believe you're following this codelab example with all instructions mentioned in the codelab example in that we are loading the "cars" dataset from a JSON file that we have hosted for you here but I see you're trying to load MNIST dataset so for that please refer 3. Load the data section from this TensorFlow.js — Handwritten digit recognition with CNNs codelab example.
We have provided code to load these images from a special sprite file (~10MB) that we have created for you so that we can focus on the training portion.

Feel free to study the data.js file to understand how the data is loaded. Or once you are done with this tutorial, create your own approach to loading the data.

The provided code contains a class MnistData that has two public methods:

nextTrainBatch(batchSize): returns a random batch of images and their labels from the training set.
nextTestBatch(batchSize): returns a batch of images and their labels from the test set

I hope it will help you to resolve your issue, if issue still persists please help us with your Github repo/Codepen example to investigate this issue further.

Thank you for your cooperation and patience.

Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Apr 23, 2024
Copy link

github-actions bot commented May 1, 2024

This issue was closed due to lack of activity after being marked stale for past 7 days.

@github-actions github-actions bot closed this as completed May 1, 2024
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants