Skip to content

Bug in JointAutoregressiveHierarchicalPriors._compress_ar #25

@BYchao100

Description

@BYchao100

https://github.com/InterDigitalInc/CompressAI/blob/master/compressai/models/priors.py
In JointAutoregressiveHierarchicalPriors._compress_ar:
ctx_p = F.conv2d( y_crop, self.context_prediction.weight, bias=self.context_prediction.bias )
self.context_prediction.weight ignores the mask, leading to the context mismatch between _compress_ar and _decompress_ar.
y_hat in _compress_ar is the full feature and needs to be masked.

Solution:
masked_weight = self.context_prediction.weight * self.context_prediction.mask
ctx_p = F.conv2d( y_crop, masked_weight, bias=self.context_prediction.bias )

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions