static float floatFromBFloat16Bits(short bits) {
        return Float.intBitsToFloat(bits << 16);
    }
Decode some data to a tensor

@param type the type to decode and validate to, or empty to use the type given in the data
@param buffer the buffer containing the data, use GrowableByteByffer.wrap(byte[]) if you have a byte array
@return the resulting tensor
@throws IllegalArgumentException if the tensor data was invalid
vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java