hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
865 stars 199 forks source link

function "NetLearner::learn" is deprecated, how to train a network by the new method? #134

Closed AuroraRAS closed 6 years ago

AuroraRAS commented 6 years ago

I'm trying to build a simple NN follow the API document, but maybe need some update.

https://github.com/hughperkins/DeepCL/blob/master/doc/NeuralNetAPI.md#train

https://github.com/hughperkins/DeepCL/blob/b2562203cd72112b18e9fa511a4f0d3506375200/src/batch/NetLearner.cpp#L148

hughperkins commented 6 years ago

Using the tickXXX methods, eg something like: https://github.com/hughperkins/DeepCL/blob/b2562203cd72112b18e9fa511a4f0d3506375200/src/main/train.cpp#L388

    netLearner->reset();
    while(!netLearner->isLearningDone()) {
        netLearner->tickBatch();
        if(netLearner->getEpochDone()) {
            // ...
        }
   }
AuroraRAS commented 6 years ago

it's working, thanks.