[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/2php/CaffeOnACL/master/src/caffe/layers/memory_data_layer.cpp [Back]  [Original]

#ifdef USE_OPENCV
#include 
#endif  // USE_OPENCV

#include 

#include "caffe/layers/memory_data_layer.hpp"

namespace caffe {

template 
void MemoryDataLayer::DataLayerSetUp(const vector& bottom,
     const vector& top) {
  batch_size_ = this->layer_param_.memory_data_param().batch_size();
  channels_ = this->layer_param_.memory_data_param().channels();
  height_ = this->layer_param_.memory_data_param().height();
  width_ = this->layer_param_.memory_data_param().width();
  size_ = channels_ * height_ * width_;
  CHECK_GT(batch_size_ * size_, 0) Reshape(batch_size_, channels_, height_, width_);
  top[1]->Reshape(label_shape);
  added_data_.Reshape(batch_size_, channels_, height_, width_);
  added_label_.Reshape(label_shape);
  data_ = NULL;
  labels_ = NULL;
  added_data_.cpu_data();
  added_label_.cpu_data();
}

template 
void MemoryDataLayer::AddDatumVector(const vector& datum_vector) {
  CHECK(!has_new_data_) 

Web Proxy Viewer  |  New URL  |  Original Page