Skip to content

Instantly share code, notes, and snippets.

@Silver-Shen
Silver-Shen / CaffeBatchPrediction.cpp
Last active August 29, 2015 14:25 — forked from erogol/CaffeBatchPrediction.cpp
Caffe c++ batch based prediction
#include "caffeclassifier.h"
CaffeClassifier::CaffeClassifier(const string& model_file,
const string& trained_file,
const string& mean_file,
const string& label_file,
const bool use_GPU,
const int batch_size) {
if (use_GPU)
Caffe::set_mode(Caffe::GPU);