pub fn assert_shape(actual: &[usize], expected: &[usize]) -> Result<()>
Sanity check: the shape of an actual tensor matches an expected shape vector.