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

Method set_batch_size

src/caffe/layers/memory_data_layer.cpp:99–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98template <typename Dtype>
99void MemoryDataLayer<Dtype>::set_batch_size(int new_size) {
100 CHECK(!has_new_data_) <<
101 "Can't change batch_size until current data has been consumed.";
102 batch_size_ = new_size;
103 added_data_.Reshape(batch_size_, channels_, height_, width_);
104 added_label_.Reshape(batch_size_, 1, 1, 1);
105}
106
107template <typename Dtype>
108void MemoryDataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,

Callers 10

TYPED_TESTFunction · 0.80
TYPED_TESTFunction · 0.80
TestReadMethod · 0.80
TestSkipMethod · 0.80
TestReshapeMethod · 0.80
TestReadCropMethod · 0.80
TYPED_TESTFunction · 0.80
UpgradeV0LayerParameterFunction · 0.80

Calls 1

ReshapeMethod · 0.45

Tested by 9

TYPED_TESTFunction · 0.64
TYPED_TESTFunction · 0.64
TestReadMethod · 0.64
TestSkipMethod · 0.64
TestReshapeMethod · 0.64
TestReadCropMethod · 0.64
TYPED_TESTFunction · 0.64