def METHOD_NAME(self, inputs, state=()):
    """
    Args:
        inputs (tensor): with the shape the same as input_tensor_spec
    """
    input_embedding, quantized, quantized_st = self._predict_step(inputs)
    e_latent_loss = F.mse_loss(
        quantized.detach(), input_embedding, reduction="none")
    q_latent_loss = F.mse_loss(
        quantized, input_embedding.detach(), reduction="none")
    # encoding loss
    enc_loss = (q_latent_loss +
                self._commitment_loss_weight * e_latent_loss).mean(dim=1)
    # decoding loss
    rec = self._decoding_net(quantized_st)[0]
    recon_loss = F.mse_loss(rec, inputs, reduction="none").mean(dim=1)
    if self._debug_summaries and alf.summary.should_record_summaries():
        with alf.summary.scope(self._name):
            alf.summary.embedding("vq_embedding", self._embedding.detach())
    loss = (enc_loss + recon_loss)
    info = VqvaeLossInfo(
        quantization=q_latent_loss.mean(1),
        commitment=e_latent_loss.mean(1),
        reconstruction=recon_loss)
    loss_info = LossInfo(loss=loss, extra=info)
    return AlgStep(output=rec, state=state, info=loss_info)