torch.dimension_error_out_of_range
export type dimension_error_out_of_range<
Dim extends number,
Rank extends number,
> = ErrorShape<`dimension_error_out_of_range<dim=${Dim}, rank=${Rank}>`>;Dimextends numberRankextends numberDimension out of range error. Occurs when a dimension index exceeds the tensor's rank.
Examples
const a = torch.zeros(2, 3); // 2D tensor
const b = a.sum(5); // ERROR: dim 5 out of range for 2D
// b.shape is dimension_error_out_of_range<5, 2>