kernel-elastic-autoencoder 3.4.0__tar.gz → 3.4.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.4
2
2
  Name: kernel_elastic_autoencoder
3
- Version: 3.4.0
3
+ Version: 3.4.1
4
4
  Summary: Implementation of Kernel-Elastic Autoencoder for Molecular Design (https://doi.org/10.1093/pnasnexus/pgae168)
5
5
  License: MIT
6
6
  Author: Felix Rotter-McCartney
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kernel_elastic_autoencoder"
3
- version = "3.4.0"
3
+ version = "3.4.1"
4
4
  description = "Implementation of Kernel-Elastic Autoencoder for Molecular Design (https://doi.org/10.1093/pnasnexus/pgae168)"
5
5
  authors = [
6
6
  { name = "Felix Rotter-McCartney", email = "felix.rotter@mail.utoronto.ca" }
@@ -265,9 +265,7 @@ class Pipeline:
265
265
  top_prob_inds = (
266
266
  (
267
267
  top_probs.sum(dim=-1)
268
- / torch.sqrt(grouped_ids != self.tokenizer.pad_token_id)
269
- .to(torch.long)
270
- .sum(dim=-1)
268
+ / torch.sqrt((grouped_ids != self.tokenizer.pad_token_id).to(torch.long).sum(dim=-1))
271
269
  )
272
270
  .topk(k=beam_size, dim=1)
273
271
  .indices.squeeze(-1)
@@ -297,9 +295,7 @@ class Pipeline:
297
295
  top_prob_inds = (
298
296
  (
299
297
  top_probs.sum(dim=-1)
300
- / torch.sqrt(grouped_ids != self.tokenizer.pad_token_id)
301
- .to(torch.long)
302
- .sum(dim=-1)
298
+ / torch.sqrt((grouped_ids != self.tokenizer.pad_token_id).to(torch.long).sum(dim=-1))
303
299
  )
304
300
  .topk(k=1, dim=1)
305
301
  .indices.squeeze(-1)