public static Builder of(TensorType type, DimensionSizes sizes) {
            validate(type, sizes);
            return switch (type.valueType()) {
                case DOUBLE -> new IndexedDoubleTensor.BoundDoubleBuilder(type, sizes);
                case FLOAT -> new IndexedFloatTensor.BoundFloatBuilder(type, sizes);
                case BFLOAT16 -> new IndexedFloatTensor.BoundFloatBuilder(type, sizes);
                case INT8 -> new IndexedFloatTensor.BoundFloatBuilder(type, sizes);
                default -> throw new IllegalStateException("Unexpected value type " + type.valueType());
            };
        }
Create a builder with dimension size information for this instance. Must be one size entry per dimension,
and, agree with the type size information when specified in the type.
If sizes are completely specified in the type this size information is redundant.
vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java