INNER CODE UNIT · Python

log_probs_0

lucidrains/vector-quantize-pytorch · vector_quantize_pytorch/binary_mapper.py:114

        log_probs_0 = F.logsigmoid(-logits)

        log_probs = torch.where(sampled_bits, log_probs_1, log_probs_0)

        if not sum_bits:
            return inverse_pack_lead_dims(log_probs)

        log_probs = log_probs.sum(dim = -1)
        return inverse_pack_lead_dims(log_probs, '*')

    def forward(
        self,
        logits,
        temperature = 1.,
        straight_through = None,
        calc_aux_loss = None,
        deterministic = None,
        return_indices = False,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…