Exponential-Golomb Code¶
- measure_expgolomb_rate(
- q_module: Module,
- q_step: DescriptorNN,
- expgol_cnt: DescriptorNN,
Get the rate associated with the current parameters.
- Returns:
- The rate of the different modules wrapped inside a dictionary
of float. It does not return tensor so no back propagation is possible
- Return type:
DescriptorNN
- Parameters:
q_module (Module)
q_step (DescriptorNN)
expgol_cnt (DescriptorNN)
- exp_golomb_nbins(symbol: Tensor, count: int = 0) Tensor [source]¶
Compute the number of bits required to encode a Tensor of integers using an exponential-golomb code with exponent
count
.- Parameters:
symbol (Tensor) – Tensor to encode
count (
int
, optional) – Exponent of the exp-golomb code. Defaults to 0.
- Returns:
Number of bits required to encode all the symbols.
- Return type:
Tensor