INNER CODE UNIT · Python

log_probs

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

        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,
        reduce_aux_kl_loss = True
    ):
        deterministic = default(deterministic, self.deterministic_on_eval and not self.training)

        straight_through = default(straight_through, self.training)
        calc_aux_loss = default(calc_aux_loss, self.training)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…