Skip to main content

binary_unpacker

Function binary_unpacker 

Source
pub fn binary_unpacker(
    packed: &Tensor,
    original_shape: (usize, usize),
    target_dtype: DType,
    device: &Device,
) -> Result<Tensor>
Expand description

Unpack a 2D I32 packed Candle tensor back into a {-1, +1} tensor of target_dtype on device.

Matches upstream binary_unpacker.

ยงErrors

Returns an error if packed is not a 2D I32 tensor matching (rows, cols.div_ceil(32)).