diff --git a/src/caffe/blob.cpp b/src/caffe/blob.cpp index 603e52f7025..46c4f3e0d1b 100644 --- a/src/caffe/blob.cpp +++ b/src/caffe/blob.cpp @@ -156,12 +156,14 @@ template void Blob::ShareData(const Blob& other) { CHECK_EQ(count_, other.count()); data_ = other.data(); + capacity_ = 0; } template void Blob::ShareDiff(const Blob& other) { CHECK_EQ(count_, other.count()); diff_ = other.diff(); + capacity_ = 0; } // The "update" method is used for parameter blobs in a Net, which are stored