Beispiel #1
0
void Blob<Dtype>::ShareDiff(const Blob& other) {
  // SID MEMORY COMPACT LIGHT WEIGHT CAFFE <BEGIN>
  if(_is_diff_initialized==0){
      diff_.reset(new SyncedMemory(capacity_*sizeof(Dtype)));
      _is_diff_initialized=1;
  }
  // SID MEMORY COMPACT LIGHT WEIGHT CAFFE <END>
  CHECK_EQ(count_, other.count());
  diff_ = other.diff();
}
Beispiel #2
0
void Blob<Dtype>::ShareDiff(const Blob& other) {
  CHECK_EQ(count_, other.count());
  diff_ = other.diff();
}
void Blob<Dtype>::ShareDiff(const Blob& other) {
  CHECK_EQ(count_, other.count());
  diff_ = other.diff(); // 赋值操作共享other中的资源,并停止对原有资源的共享
}
Beispiel #4
0
	void shareDiff(const Blob& blob) {
		CHECK_EQ(count(), blob.count());
		diff_ = blob.diff();
	}