MCPcopy Create free account
hub / github.com/BVLC/caffe / Reset

Method Reset

src/caffe/layers/memory_data_layer.cpp:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82template <typename Dtype>
83void MemoryDataLayer<Dtype>::Reset(Dtype* data, Dtype* labels, int n) {
84 CHECK(data);
85 CHECK(labels);
86 CHECK_EQ(n % batch_size_, 0) << "n must be a multiple of batch size";
87 // Warn with transformation parameters since a memory array is meant to
88 // be generic and no transformations are done with Reset().
89 if (this->layer_param_.has_transform_param()) {
90 LOG(WARNING) << this->type() << " does not transform array data on Reset()";
91 }
92 data_ = data;
93 labels_ = labels;
94 n_ = n;
95 pos_ = 0;
96}
97
98template <typename Dtype>
99void MemoryDataLayer<Dtype>::set_batch_size(int new_size) {

Callers

nothing calls this directly

Calls 1

typeMethod · 0.95

Tested by

no test coverage detected