提交 7866f724 编写于 作者: L liuqi

Update tensor reshape check when buffer type is image.

上级 9e52599e
......@@ -217,8 +217,12 @@ class Tensor {
inline void Reshape(const std::vector<index_t> &shape) {
shape_ = shape;
if (has_opencl_image()) {
MACE_CHECK(raw_size() <= 4 * buffer_->size());
} else {
MACE_CHECK(raw_size() <= buffer_->size());
}
}
inline MaceStatus Resize(const std::vector<index_t> &shape) {
shape_ = shape;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册