diff --git a/paddle/fluid/framework/tensor.h b/paddle/fluid/framework/tensor.h index 0b95e585d71edbc20e18f9ddb7efa3ed51cdb200..d9fddc4c77d99efcb119ae37591b26bff0e51c0a 100644 --- a/paddle/fluid/framework/tensor.h +++ b/paddle/fluid/framework/tensor.h @@ -158,6 +158,7 @@ class Tensor { void ShareBufferWith(const Tensor& tensor) { holder_ = tensor.holder_; offset_ = tensor.offset_; + type_ = tensor.type_; } bool IsSharedBufferWith(const Tensor& src) const {