Class TensorShapeInfo

Inheritance Relationships

Base Type

Class Documentation

class TensorShapeInfo : public nvcv::detail::TensorShapeInfoImpl<TensorLayoutInfo>

This class provides information about the shape of a tensor.

It inherits from TensorShapeInfoImpl and is specialized for the base tensor layout type, providing functions to retrieve the shape, layout, and whether the tensor is batched or corresponds to an image.

Public Static Functions

static inline bool IsCompatible(const TensorShape &tshape)

Checks if the provided tensor shape is compatible with this class. In this case, all tensor shapes are considered compatible.

Parameters:

tshape – The tensor shape to check.

Returns:

Always true, as all tensor shapes are considered compatible.

static inline Optional<TensorShapeInfo> Create(const TensorShape &tshape)

Creates a TensorShapeInfo object for the provided tensor shape.

Parameters:

tshape – The tensor shape to create the TensorShapeInfo for.

Returns:

A TensorShapeInfo object for the provided tensor shape.