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

Helpers seem to be shuffled. #1

Closed
hourliert opened this issue Aug 24, 2015 · 2 comments
Closed

Helpers seem to be shuffled. #1

hourliert opened this issue Aug 24, 2015 · 2 comments

Comments

@hourliert
Copy link

Hi,

I'm trying to use your library but it seems that when I try to get a digit for 0, 2, 3, 4, 6, 7, 8, 9 I always get a wrong digit.
It seems that the mapping of real digits is wrong.

I always get this mapping:

desired digit real digit
0 8
1 1
2 4
3 6
4 6
5 5
6 9
7 3
8 7
9 0

Here the code that generates the following image:

  for (var i = 0; i < 10; i++) {
    var digit = mnist[i].get();

    var el: HTMLCanvasElement = <HTMLCanvasElement>document.getElementById('canvas' + i);

    var context = el.getContext('2d');

    context.fillStyle = 'white';
    context.fillRect(0, 0, el.width, el.height);

    console.info('Drawing...');
    mnist.draw(digit, context, 0, 0);

    // (<any>context).imageSmoothingEnabled = true;
    context.drawImage( el, 0, 0, 4*el.width, 4*el.height );
  } 

screen shot 2015-08-24 at 6 12 32 pm

Did I miss something ?

Btw, I am using JSPM with typescript.

@hourliert hourliert changed the title Helpers seem to be shuffle. Helpers seem to be shuffled. Sep 7, 2015
@NoPinky
Copy link

NoPinky commented Mar 3, 2016

I also have this issue. And you also notice, there is no way to get a 2 while the dataset for 6 is doubled. That is a strangely grave mistake and I couldn't imagine how this could happen programmatically.
The faulty data lies within the /src/*.json files. But the library uses a packed mnist.js file, where the json's are already included.

@cazala
Copy link
Owner

cazala commented Jul 9, 2016

This is fixed in 1.0.3

@cazala cazala closed this as completed Jul 9, 2016
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

No branches or pull requests

3 participants