- Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
We have an enum type called DataLayout
Paddle/paddle/framework/data_layout.h
Lines 25 to 29 in aef1ab0
| enum class DataLayout { | |
| kNHWC = 0, | |
| kNCHW = 1, | |
| kAnyLayout = 2, | |
| }; |
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:
Metadata
Metadata
Assignees
Labels
No labels