Rename DataLayout into FourDimImageTensorDataLayout
We have an enum type called DataLayout
https://github.com/PaddlePaddle/Paddle/blob/aef1ab0da9aef2b09b813615db1659aed3971b89/paddle/framework/data_layout.h#L25-L29
and we have a property DataLayout Tensor::layout_.
The reason that we made this design is that we hope that for those tensors that represent images, we could have additional information describing the meaning of its dimensions.
However, we noticed that it is not a good idea to add the property layout_ to class Tensor. Instead, we should create a new C++ class ImageTensor derived from Tensor. For more details, please see the following comments:
If we are going to have a data type, which represents an image, we should define a new C++ class as follows:
class ImageTensor : public Tensor {
public:
enum Layout {
UNKNOWN = 0,
NHWC = 1,
HWNC = 2,
...
};
private:
Layout layout_;
};
Also, we need to update the framework.proto file
https://github.com/PaddlePaddle/Paddle/blob/aef1ab0da9aef2b09b813615db1659aed3971b89/paddle/framework/framework.proto#L121-L124
We should add a data type here IMAGE in enum VarType
What is the meaning of kAnyLayout?
您好,此issue在近一个月内暂无更新,我们将于今天内关闭。若在关闭后您仍需跟进提问,可重新开启此问题,我们将在24小时内回复您。因关闭带来的不便我们深表歉意,请您谅解~感谢您对PaddlePaddle的支持! Hello, this issue has not been updated in the past month. We will close it today for the sake of other user‘s experience. If you still need to follow up on this question after closing, please feel free to reopen it. In that case, we will get back to you within 24 hours. We apologize for the inconvenience caused by the closure and thank you so much for your support of PaddlePaddle Group!