A slice of the form x[start:start + n] has extent n on the sliced axis whenever n is statically known, regardless of start; the analysis currently degrades such slices to an unknown extent.
Witness chain (MusicTransformer-tensorflow2.0): data.py:85-93 conditionally reassigns the loaded event sequence through data = data[start:start + max_length], and Data.batch collects the per-file sequences and batches them via np.array(batch_data) (data.py:36), so the batched result's runtime shape is (batch_size, length) with length flowing from the driver. Recovering the slice extent (through the existing constant-folding and argument-resolution machinery for n) and composing the container's element shapes through np.array would tighten the batch shape from unknown toward (batch, n).
The dim-arithmetic classification follows #721: an n that resolves to a fixed integer yields a NumericDim; a fixed-but-unresolvable n yields UnresolvedDim; only None-evidence yields DynamicDim.
A slice of the form
x[start:start + n]has extentnon the sliced axis whenevernis statically known, regardless ofstart; the analysis currently degrades such slices to an unknown extent.Witness chain (MusicTransformer-tensorflow2.0):
data.py:85-93conditionally reassigns the loaded event sequence throughdata = data[start:start + max_length], andData.batchcollects the per-file sequences and batches them vianp.array(batch_data)(data.py:36), so the batched result's runtime shape is(batch_size, length)withlengthflowing from the driver. Recovering the slice extent (through the existing constant-folding and argument-resolution machinery forn) and composing the container's element shapes throughnp.arraywould tighten the batch shape from unknown toward(batch, n).The dim-arithmetic classification follows #721: an
nthat resolves to a fixed integer yields aNumericDim; a fixed-but-unresolvablenyieldsUnresolvedDim; onlyNone-evidence yieldsDynamicDim.