dct-autoencoder 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dct-autoencoder
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary:
5
5
  Author: Dariush Bahrami
6
6
  Author-email: dariushbahrami1993@gmail.com
@@ -14,6 +14,10 @@ class DCTAutoencoder(nn.Module):
14
14
 
15
15
  Args:
16
16
  block_size (int, optional): The block size. Defaults to 8.
17
+ luminance_compression_ratio (float, optional): The luminance compression ratio.
18
+ Defaults to 1/2.
19
+ chrominance_compression_ratio (float, optional): The chrominance compression ratio.
20
+ Defaults to 1/4.
17
21
  """
18
22
 
19
23
  def __init__(
@@ -198,7 +202,7 @@ class DCTAutoencoder(nn.Module):
198
202
  + 2 * self.compression_chrominance_passband.item()
199
203
  )
200
204
 
201
- def compress(self, encodings):
205
+ def compress(self, encodings: torch.Tensor) -> torch.Tensor:
202
206
  if not self.do_compression:
203
207
  return encodings
204
208
  else:
@@ -211,7 +215,7 @@ class DCTAutoencoder(nn.Module):
211
215
  compressed_encoding = torch.cat([l, c1, c2], dim=1)
212
216
  return compressed_encoding
213
217
 
214
- def decompress(self, compressed_encoding):
218
+ def decompress(self, compressed_encoding: torch.Tensor) -> torch.Tensor:
215
219
  if not self.do_compression:
216
220
  return compressed_encoding
217
221
  else:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dct-autoencoder"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = ""
5
5
  authors = ["Dariush Bahrami <dariushbahrami1993@gmail.com>"]
6
6
  readme = "README.md"
File without changes