def inferred_dimensions

bendtorch-core@0.1.0.0 · src/tensor/signed.bend:214

import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import Base

214# PyTorch's infer_size: the sizes of a reshape of `count` elements. With no
215# Inferred size, the sizes themselves; with one, it is count / product of
216# the others when that divides exactly, the product capped at the count;
217# more than one is refused first.
218def inferred_dimensions(+count: Nat, +extents: List<&2, Extent>) -> Result<&2, &2, Error, List<&2, U32>>:
219  inferred_from(count, extents, inferred_count(extents))

Uses (8)

Used by (8)