提交 2dccab87 编写于 作者: F fengjiayi

fix some syntax problems

上级 0665dc97
......@@ -29,7 +29,7 @@ class Tensor {
public:
Tensor() : offset_(0) {}
Tensor(const DDim& dims) : dims_(dims), offset_(0) {}
explicit Tensor(const DDim& dims) : dims_(dims), offset_(0) {}
template <typename T>
const T* data() const {
......@@ -63,7 +63,7 @@ class Tensor {
offset_ = src.offset_;
}
Tensor Slice(const int& begin_idx, const int& end_idx) {
Tensor Slice(const int& begin_idx, const int& end_idx) const {
PADDLE_ENFORCE(holder_ != nullptr,
"The sliced tenosr has not been initialized.");
PADDLE_ENFORCE(begin_idx >= 0 && end_idx <= dims_[0],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册