mxnet.io.DataDesc¶
-
class
mxnet.io.
DataDesc
[source]¶ DataDesc is used to store name, shape, type and layout information of the data or the label.
The layout describes how the axes in shape should be interpreted, for example for image data setting layout=NCHW indicates that the first axis is number of examples in the batch(N), C is number of channels, H is the height and W is the width of the image.
For sequential data, by default layout is set to
NTC
, where N is number of examples in the batch, T the temporal axis representing time and C is the number of channels.- Parameters
cls (DataDesc) – The class.
name (str) – Data name.
shape (tuple of int) – Data shape.
dtype (np.dtype, optional) – Data type.
layout (str, optional) – Data layout.
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
count
Return number of occurrences of value.
get_batch_axis
(layout)Get the dimension that corresponds to the batch size.
get_list
(shapes, types)Get DataDesc list from attribute lists.
index
Return first index of value.
Attributes
name
Alias for field number 0
shape
Alias for field number 1