SetDimSizes

Description

Sets the shape of a tensor. The size of each dimension is represented by an std::vector<int64_t>.

Prototype

void SetDimSizes(const std::vector<int64_t> &dims)

Parameters

Parameter

Input/Output

Description

dims

Input

An std::vector<int64_t> for the tensor shape.

Returns

None

Restrictions

None

Example

vector<int64_t> dims = { 3, 1, 3, 5 };
shape->SetDimSizes(dims);