Skip to content

Question on How EntropyBottleneck's Parameters are Updated #177

Answered by YodaEmbedding
Will0x6c5f asked this question in Q&A
Discussion options

You must be logged in to vote

EntropyBottleneck.forward computes the likelihoods that are used for the rate loss:

likelihood = self._likelihood(outputs)

These likelihoods are computed using an input tensor and the matrices/biases:

def _logits_cumulative(self, inputs: Tensor, stop_gradient: bool) -> Tensor:
# TorchScript not yet working (nn.Mmodule indexing not supported)
logits = inputs
for i in range(len(self.filters) + 1):
matrix = getattr(self, f"_matrix{i:d}")
if stop_gradient:
matrix = matrix.detach()

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Will0x6c5f
Comment options

@YodaEmbedding
Comment options

@Will0x6c5f
Comment options

@YodaEmbedding
Comment options

@Will0x6c5f
Comment options

Answer selected by Will0x6c5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants