torchbase 0.1.2__tar.gz → 0.1.3__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.3
2
2
  Name: torchbase
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A minimalist base for ML projects in PyTorch
5
5
  License: Apache-2.0
6
6
  Author: Sohrab Ferdowsi
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "torchbase"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "A minimalist base for ML projects in PyTorch"
5
5
  authors = ["Sohrab Ferdowsi <sohrab.ferdowsi@gmail.com>"]
6
6
  license = "Apache-2.0"
@@ -258,6 +258,8 @@ class TrainingBaseSession(ABC):
258
258
  def _init_network(self) -> torch.nn.Module:
259
259
 
260
260
  network = self.init_network()
261
+ network = network.to(self.device)
262
+
261
263
  if not isinstance(network, torch.nn.Module):
262
264
  raise TypeError("Failed to instantiate a valid `network`, an instance of `torch.nn.Module`.")
263
265
 
File without changes
File without changes