paddle::framework::Tensor design issues
Created by: wangkuiyi
-
set_dims
==>Resize
-
ShareDataFrom
==>ShareDataWith
- The following code snippet in
ShareDataFrom
looks likestd::vector<int> d = vectorize(dims_); int base = 1; for (size_t i = 1; i < d.size(); ++i) { base *= d[i]; }
product(dims_);
- Document
Tensor::offset_
as for supporting slicing. -
CheckDims
==>MustNotEmpty
-
typename PType
==>typename Place
- Move
class Deleter
topaddle::memory
. - Remove
T* raw_data() const
. - In
SharedDataWith
, replace
byholder_ = src.holder_; Resize(src.dims()); start_ = src.start_;
*this = src;
-
DDim dims() const
==>const DDim& dims() const