Slight change to Tensor methods
Created by: wangkuiyi
Slight change to some Tensor methods from
inline void Resize(const DDim& dims);
inline void ShareDataWith(const Tensor& src);
to
inline Tensor& Resize(const DDim& dims);
inline Tensor& ShareDataWith(const Tensor& src);
so that we can write
return LODTensor(lod_.Slice(...)).ShareDataWith(*this);
and
tensor.Resize(new_dim).mutable_data<float>(...);