process.h 607 字节
Newer Older
X
xiexionghang 已提交
1 2 3 4 5 6 7 8 9 10 11 12
#pragma once
#include "paddle/fluid/train/custom_trainer/feed/common/registerer.h"
#include "paddle/fluid/train/custom_trainer/feed/trainer_context.h"

namespace paddle {
namespace custom_trainer {
namespace feed {

class Process {
public:
    Process() {}
    virtual ~Process() {}
X
xiexionghang 已提交
13 14 15 16
    virtual int initialize(std::shared_ptr<TrainerContext> context_ptr) {
        _context_ptr = context_ptr.get();
        return 0;
    }
X
xiexionghang 已提交
17
    virtual int run();
X
xiexionghang 已提交
18 19
protected:
    TrainerContext* _context_ptr = NULL;
X
xiexionghang 已提交
20 21 22 23 24 25
};
REGISTER_REGISTERER(Process);

}  // namespace feed
}  // namespace custom_trainer
}  // namespace paddle