Giter Site home page Giter Site logo

Comments (9)

hughperkins avatar hughperkins commented on June 12, 2024

Yes sure, so:

What language are you hoping to use to run the training? ie, python? C/C++? commandline? (something else?)

from deepcl.

skn123 avatar skn123 commented on June 12, 2024

Hugh
Thanks for the response. I work with C++. So I started off with looking at train.cpp / test.cpp from command line.
So an ideal example for the "uninitiated" would be as follows:
a.) A simple example of populating a set of Multi-class training feature vectors in DeepCL's internal format
b.) Generating a training model
c.) Serializing the model to a std::string and saving it to disk
d.) Loading the model from disk as a std::string and deserializing it
e.) Classify or regress a set of test features using this model.

Do you have any example to this effect?

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

Somehow this fell through my radar. I should address this...

from deepcl.

skn123 avatar skn123 commented on June 12, 2024

Hugh, any updates on this?

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

Well, lets go one step at a time, otherwise I just stare at a huge long list, and go ..' errr .... some time, maybe' :-P

So, 'a.) A simple example of populating a set of Multi-class training feature vectors in DeepCL's internal format'. A few places you can get this from:

So, pick one of these loaders, and look how it works. Alternatively, basically there are two sets of data:

  • input data features. These are in a 1-dimensional vector, laid out as [n][plane][height][width] (but in 1 dimension, but the strides are in this order)
  • labels. These are also a 1-dimensional vector, of labels (0-based, I think)

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

alternatively, really, skip all the file links, and just jump to the last couple of sentences. You need two 1-dimensional arrays, as stated above:

  • input data features. These are in a 1-dimensional array of floats, laid out as [n][plane][height][width] (but in 1 dimension, but the strides are in this order), ie a float *
  • labels. These are also a 1-dimensional array, of labels, of type int *

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

(really, everything you need is in https://github.com/hughperkins/DeepCL/blob/master/src/main/train.cpp , its just a question of picking out the bits you need really. for example, this handles a bunch of different trainers https://github.com/hughperkins/DeepCL/blob/master/src/main/train.cpp#L287-L319 but you only need to pick one. For example, if you want to use SGD, then use these lines https://github.com/hughperkins/DeepCL/blob/master/src/main/train.cpp#L289-L293 )

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

as far as 'serializing to a string', this would be new functionality. you can save to disk, but it would be in binary format. It's handled by this line https://github.com/hughperkins/DeepCL/blob/master/src/main/train.cpp#L417-L418 , so you can follow the breadcrumbs, and have a look at how it works. If you want to convert to a string, you could for example copy and paste the WeightsPersister, to a new class, and modify it to your requirements.

from deepcl.

hughperkins avatar hughperkins commented on June 12, 2024

As far as 'classify', you can look at how the 'predict' works, ie https://github.com/hughperkins/DeepCL/blob/master/src/main/predict.cpp Again, you'll need to kind of pick out the bits you need, and throw the rest away. For example everything after line 287 https://github.com/hughperkins/DeepCL/blob/master/src/main/predict.cpp#L287 is just about reading commandline options, printing usage etc, so you can probalby just ignore that. Otherwise, we can see we:

from deepcl.

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.