torch.CheckShapeError
export type CheckShapeError<S extends Shape, SuccessType> = S extends { __isShapeError: true }
? ShapeErrorMessage<S>
: SuccessType;Sextends ShapeSuccessTypeCheck if a shape is an error shape. Returns the error message string if it is, otherwise returns the original type.