This reverses pack_int2, restoring the original tensor whose values lie in
[-2, 1] (signed) or [0, 3] (unsigned) from a packed tensor where each
byte stores four int2 values. It restores the original axis order and
removes any padding that was added during packing.
Args
packed
An int8 or uint8 tensor with four int2 values per element
along the specified axis.
orig_len
The original (unpadded) length of the packed axis. Used to
trim the padding inserted during packing.
axis
The axis along which the tensor was packed. Defaults to 0.
dtype
The data type of the input and unpacked tensor. Can be
"int8" or "uint8". Defaults to "int8".
Returns
unpacked
A tensor with the same shape as the original (unpacked)
tensor.