kernel-elastic-autoencoder 3.3.0__tar.gz → 3.3.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.3.0
3
+ Version: 3.3.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.3.0"
3
+ version = "3.3.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" }
@@ -123,7 +123,7 @@ class Trainer:
123
123
  accelerator.wait_for_everyone()
124
124
  for epoch in range(curr_epoch, self.config_typed.common.max_epochs):
125
125
  model.train()
126
- train_loss = torch.tensor([])
126
+ train_loss = torch.tensor([], device=accelerator.device)
127
127
  for input_ids, conditions, token_mask, condition_mask in tqdm(
128
128
  dataloader_train, desc=f"Epoch {epoch}, Train Batch"
129
129
  ):
@@ -140,7 +140,7 @@ class Trainer:
140
140
  accelerator.print(f"Avg. train loss: {train_loss.mean().item()}")
141
141
 
142
142
  model.eval()
143
- test_loss = torch.tensor([])
143
+ test_loss = torch.tensor([], device=accelerator.device)
144
144
  for input_ids, conditions, token_mask, condition_mask in tqdm(
145
145
  dataloader_test, desc=f"Epoch {epoch}, Test Batch"
146
146
  ):