tensor/utils.h#

Tensor-domain schema helpers, including onnx::resizeShapeInference() and onnx::gridSampleShapeInference().

Declares tensor-operator schema and shape-inference helpers.

This header exposes helper routines used by tensor-domain operators such as Resize and GridSample, including opset-specific inference entry points.

namespace ONNX_LIGHT_NAMESPACE

Enums

enum class KeepAspectRatioPolicy : std::uint8_t#

Values:

enumerator STRETCH#
enumerator NOT_LARGER#
enumerator NOT_SMALLER#

Functions

void resizeShapeInference(InferenceContext &ctx)#
void gridSampleShapeInference(InferenceContext &ctx)#
void resizeShapeInferenceHelper(const TensorShapeProto &input_shape, const std::vector<float> &scales_data, TensorShapeProto *output_shape)#
void resizeShapeInferenceHelper(const TensorShapeProto &input_shape, const std::vector<int64_t> &sizes_data, TensorShapeProto *output_shape)#
void resizeShapeInference_opset7_to_10(InferenceContext &ctx)#
void resizeShapeInference_opset11_to_12(InferenceContext &ctx)#
void resizeShapeInference_opset13_to_18(InferenceContext &ctx)#
void resizeShapeInference_opset18_to_19(InferenceContext &ctx)#
void resizeShapeInferenceHelper_opset7_to_10(const TensorShapeProto &input_shape, const std::vector<float> &scales_data, TensorShapeProto *output_shape)#
void KeepAspectRatioHelper(KeepAspectRatioPolicy policy, const TensorShapeProto &input_shape, const std::vector<int64_t> &axes, std::vector<int64_t> &sizes_data)#
std::function<void(OpSchema&)> PadDocGenerator(const char *description, const char *mode_description, std::vector<std::string> op_schema = OpSchema::all_tensor_types_ir4(), std::string op_schema_description = "Constrain input and output types to all tensor types.")#

Variables

const char *NonZero_ver9_doc#
const char *Transpose_doc#