Coder Social home page Coder Social logo

Exception in mnist_cnn.cpp about examples HOT 5 CLOSED

mlpack avatar mlpack commented on July 17, 2024
Exception in mnist_cnn.cpp

from examples.

Comments (5)

AdmiralPellaeon avatar AdmiralPellaeon commented on July 17, 2024 2

Thanks for the answer. I will test it!

from examples.

dfy888 avatar dfy888 commented on July 17, 2024 2
 train.row(0)

Ah, ok, thanks for the information. I think that is the issue. mlpack-3.4.2 is pretty old now but we haven't released mlpack 4 yet because we are in the midst of a big refactoring. If you can download the latest git master branch from https://github.com/mlpack/mlpack and use that and compile the MNIST CNN example against that version, it should work. If you can't, then I think this should fix it, if you change these lines:

  // Create labels for training and validatiion datasets.
  const mat trainY = train.row(0);
  const mat validY = valid.row(0);

to this:

  // Create labels for training and validatiion datasets.
  const mat trainY = train.row(0) + 1;
  const mat validY = valid.row(0) + 1;

Sorry for the inconvenience! I hope we will be able to release and package a new version of mlpack soon (there is still lots of refactoring to do though).

yes,it is work!

from examples.

rcurtin avatar rcurtin commented on July 17, 2024 1

Ah, ok, thanks for the information. I think that is the issue. mlpack-3.4.2 is pretty old now but we haven't released mlpack 4 yet because we are in the midst of a big refactoring. If you can download the latest git master branch from https://github.com/mlpack/mlpack and use that and compile the MNIST CNN example against that version, it should work. If you can't, then I think this should fix it, if you change these lines:

  // Create labels for training and validatiion datasets.
  const mat trainY = train.row(0);
  const mat validY = valid.row(0);

to this:

  // Create labels for training and validatiion datasets.
  const mat trainY = train.row(0) + 1;
  const mat validY = valid.row(0) + 1;

Sorry for the inconvenience! I hope we will be able to release and package a new version of mlpack soon (there is still lots of refactoring to do though).

from examples.

rcurtin avatar rcurtin commented on July 17, 2024

Hey @AdmiralPellaeon, thanks for the report. What version of mlpack are you compiling against?

from examples.

AdmiralPellaeon avatar AdmiralPellaeon commented on July 17, 2024

It's mlpack-3.4.2.

from examples.

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.