Git Product home page Git Product logo

Comments (18)

HuwCampbell avatar HuwCampbell commented on May 21, 2024 2

iirc they're renormalised versions of the kaggle ones.

I'll see if I can dig my ones up and chuck them on a branch.

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024 1

That would be v helpful. Or at least document what is expected.

Mine came from https://pjreddie.com/projects/mnist-in-csv/ (I don't want to have to subscribe to something to get test data.)

Better still would be to use the original data via ByteString.readFile.

Many thanks.

PS: dmesg confirms that mnist was killed because it went oom

from grenade.

erikd avatar erikd commented on May 21, 2024

The problem here is that the singletons library (which due to its use of TH which is tightly locked to the GHC version) changed how the Sing type was implemented. It used to use a data family and now uses a type family.

I have a fix for this, but that fix causes other issues which I have not yet resolved.

For now the solution is to use ghc 8.6.5.

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

Thanks, Erik. Good luck!

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

Many thanks. I'll give it a whirl. (There is a warning, on compilation, about dodgy exports which I assume is harmless.)

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

grenade itself builds, tests and benches OK with 8.8.1. Great.

Going into examples, several library upper bounds are a bit too restrictive. Running cabal build --allow-newer produces

[ 2 of 38] Compiling Grenade.Core.Shape ( src/Grenade/Core/Shape.hs, dist/build/Grenade/Core/Shape.o )

src/Grenade/Core/Shape.hs:174:36: error:
    Ambiguous occurrence ‘natVal’
    It could refer to
       either ‘Data.Singletons.TypeLits.natVal’,
              imported from ‘Data.Singletons.TypeLits’ at src/Grenade/Core/Shape.hs:33:1-41
              (and originally defined in ‘GHC.TypeNats’)
           or ‘GHC.TypeLits.natVal’,
              imported from ‘GHC.TypeLits’ at src/Grenade/Core/Shape.hs:37:1-29
    |
174 |       let rows    = fromIntegral $ natVal (Proxy :: Proxy rows)
    |                                    ^^^^^^

src/Grenade/Core/Shape.hs:175:36: error:
    Ambiguous occurrence ‘natVal’
    It could refer to
       either ‘Data.Singletons.TypeLits.natVal’,
              imported from ‘Data.Singletons.TypeLits’ at src/Grenade/Core/Shape.hs:33:1-41
              (and originally defined in ‘GHC.TypeNats’)
           or ‘GHC.TypeLits.natVal’,
              imported from ‘GHC.TypeLits’ at src/Grenade/Core/Shape.hs:37:1-29
    |
175 |           columns = fromIntegral $ natVal (Proxy :: Proxy columns)
    |                                    ^^

which suggests that the CPP isn't taking (to hide the natVal). Happy to investigate further, but you may have a quick fix.

from grenade.

erikd avatar erikd commented on May 21, 2024

I am not seeing that with ghc 8.8.2, but I am seeing another warning which I will fix in the next day or two.

from grenade.

erikd avatar erikd commented on May 21, 2024

This library depends heavily on a bunch of relatively new GHC features and libraries that are still changing frequently. Supporting more that one minor version (eg 8.8.1 vs 8.8.2) is probably not worth the effort. I will attempt to support the latest minor version of recent GHCs. Eg see : https://github.com/HuwCampbell/grenade/blob/master/.travis.yml#L5-L9

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

(Yes, I was actually using 8.8.2)
Are you saying that the examples compile (cabal build) out of the box, with no change in version bounds?

from grenade.

erikd avatar erikd commented on May 21, 2024

The tests and examples still have warnings. I intend to clean that up. The examples should build.

The library itself should build warning free, but there currently is a single warning.

from grenade.

erikd avatar erikd commented on May 21, 2024

These two lines in the .travis.yaml file:

 - cabal-3.0 configure --enable-tests
 - cabal-3.0 build all

ensures that examples and tests are built in CI.

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

Thanks. That worked for me.

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

How much memory does mnist need? Running on Ubuntu eoan, I get:

cabal run mnist mnist_train.csv mnist_test.csv 
Up to date
Training convolutional neural network...
Killed

I assume that the OS killed minst because it tried too much memory, but that's just a guess.

from grenade.

erikd avatar erikd commented on May 21, 2024

Where do the mnist_train.csv and mnist_test.csv files come from?

from grenade.

erikd avatar erikd commented on May 21, 2024

@jrp2014 did you run the CSV files from that page through the Python code?

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

No. I thought that they were the output, the translation from the original binary byte strings

from grenade.

erikd avatar erikd commented on May 21, 2024

Are the file values in the file normalized to [0..1.0]? I am pretty sure they need to be. @HuwCampbell ?

from grenade.

jrp2014 avatar jrp2014 commented on May 21, 2024

No, the ones that I used (referenced above) are just rows [0..255] Ints. Since part of the point of the MNIST dataset is comparability, I'd be inclined to start from the originals at http://yann.lecun.com/exdb/mnist/ (format described at the bottom of the page) and work from there. It's easy enough to decode even the compressed .gz data into the requisite format using ByteString. The only reason that the csv files exist was that courses that used them didn't want to have to teach about file decompression, etc, before getting on to the good stuff.

from grenade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.