Some external projects that use CompressAI as an importable library may depend on CompressionModel to create the entropy_bottleneck. Thus, we restore this legacy behavior (but discourage its use via a warning).
DeprecationWarning: The entropy_bottleneck_channels parameter is deprecated. Create an entropy_bottleneck in your model directly instead:
class YourModel(CompressionModel):
def __init__(self):
super().__init__()
self.entropy_bottleneck = EntropyBottleneck(entropy_bottleneck_channels)
Some external projects that use CompressAI as an importable library may depend on
CompressionModel
to create theentropy_bottleneck
. Thus, we restore this legacy behavior (but discourage its use via a warning).Also fixes broken CI in https://github.com/InterDigitalInc/CompressAI/pull/248/commits/f90b6cb215e34c91c081b1ed5c13d9491df8c74d.