pub fn infer_batch_size(
expected: &[Shape],
actual: &[ConcreteShape],
) -> Result<Option<usize>, ShapeMismatch>
Expand description
Infer what the batch size should be for the given input shapes.
Returns:
Ok(Some(batch_size))
if the batch size can be inferredOk(None)
if any batch size would fitErr(ShapeMismatch)
if no batch size would fit, either because there are conflicting requirements or because there is some other shape mismatch