enum ov::op::BroadcastType

Overview

BroadcastType specifies rules used for mapping of input tensor axes to output shape axes. More…

#include <attr_types.hpp>

enum BroadcastType
{
    NONE,
    EXPLICIT      = NONE,
    NUMPY,
    PDPD,
    BIDIRECTIONAL,
};

Detailed Documentation

BroadcastType specifies rules used for mapping of input tensor axes to output shape axes.

Broadcasting rules are different for Broadcast op and for element-wise ops. AutoBroadcastType::NUMPY is equivalent of BroadcastType::BIDIRECTIONAL according to spec.

EXPLICIT - Mapping of the input data shape to output shape based on axes_mapping input. NUMPY - Numpy broadcasting rules, aligned with ONNX Broadcasting. (https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md) PDPD - PaddlePaddle-style implicit broadcasting. For more informaction see AutoBroadcastType documentation. BIDIRECTIONAL - The broadcast rule is similar to numpy.array(input) * numpy.ones(target_shape). Dimensions are right alignment.