Order

class webdnn.graph.order.Order(axes)[source]

Descriptor class for representing semantics of data order.

For example, OrderNHWC means that the data is aligned as Channel-major (Batch-size-minor). Popular data order is already defined in webdnn.graph.order. You should use pre-defined order instance.

If you have to define new data order, you can simply as follows.

OrderHCNW = Order([Axis.H, Axis.C, Axis.N, Axis.W])
Parameters:axes (list of Axis) – list of axis.
check_same_axes(order)[source]

check if 2 orders have same axes (the axis order is not considered)

Parameters:other – other order
get_all_axes(order)[source]

return axes which are included in either two order.

Parameters:other – other order
get_common_axes(order)[source]

return axes which are included in both two order.

Parameters:other – other order