Skip to content

Meaning of the offset #168

Discussion options

You must be logged in to vote

_offset is set in update():

medians = self.quantiles[:, 0, 1]
minima = medians - self.quantiles[:, 0, 0]
minima = torch.ceil(minima).int()
minima = torch.clamp(minima, min=0)
maxima = self.quantiles[:, 0, 2] - medians
maxima = torch.ceil(maxima).int()
maxima = torch.clamp(maxima, min=0)
self._offset = -minima

And is later accessed during compress():

rv = self.entropy_coder.encode_with_indexes(
symbols[i].reshape(-1).int().tolist(),
indexes[

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by AlbertoPresta
Comment options

You must be logged in to vote
1 reply
@YodaEmbedding
Comment options

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