deeplotx 0.2.19__tar.gz → 0.2.20__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.
Files changed (25) hide show
  1. {deeplotx-0.2.19 → deeplotx-0.2.20}/PKG-INFO +1 -1
  2. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/nn/base_neural_network.py +4 -4
  3. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx.egg-info/PKG-INFO +1 -1
  4. {deeplotx-0.2.19 → deeplotx-0.2.20}/pyproject.toml +1 -1
  5. {deeplotx-0.2.19 → deeplotx-0.2.20}/LICENSE +0 -0
  6. {deeplotx-0.2.19 → deeplotx-0.2.20}/README.md +0 -0
  7. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/__init__.py +0 -0
  8. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/encoder/__init__.py +0 -0
  9. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/encoder/bert_encoder.py +0 -0
  10. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/encoder/long_text_encoder.py +0 -0
  11. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/nn/__init__.py +0 -0
  12. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/nn/linear_regression.py +0 -0
  13. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/nn/logistic_regression.py +0 -0
  14. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/nn/softmax_regression.py +0 -0
  15. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/trainer/__init__.py +0 -0
  16. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/trainer/base_trainer.py +0 -0
  17. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/trainer/text_binary_classification_trainer.py +0 -0
  18. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/util/__init__.py +0 -0
  19. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/util/hash.py +0 -0
  20. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx/util/read_file.py +0 -0
  21. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx.egg-info/SOURCES.txt +0 -0
  22. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx.egg-info/dependency_links.txt +0 -0
  23. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx.egg-info/requires.txt +0 -0
  24. {deeplotx-0.2.19 → deeplotx-0.2.20}/deeplotx.egg-info/top_level.txt +0 -0
  25. {deeplotx-0.2.19 → deeplotx-0.2.20}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deeplotx
3
- Version: 0.2.19
3
+ Version: 0.2.20
4
4
  Summary: Easy-2-use long text classifier trainers.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -23,10 +23,10 @@ class BaseNeuralNetwork(nn.Module):
23
23
  for param in self.parameters():
24
24
  l2_reg += (torch.pow(param, exponent=2.)).sum()
25
25
  return l2_reg
26
- return _lambda * _l2()
26
+ return _lambda * _l2() / 2.
27
27
 
28
28
  def elastic_net(self, alpha: float = 1e-4, rho: float = 0.5) -> torch.Tensor:
29
- return alpha * rho * self.l1(_lambda=1.) + alpha * (1 - rho) * self.l2(_lambda=1.) / 2.
29
+ return alpha * (rho * self.l1(_lambda=1.) + (1 - rho) * self.l2(_lambda=1.))
30
30
 
31
31
  def forward(self, x) -> torch.Tensor: ...
32
32
 
@@ -39,9 +39,9 @@ class BaseNeuralNetwork(nn.Module):
39
39
  return res
40
40
 
41
41
  def save(self):
42
- torch.save(self.state_dict(), f'{self._model_name}.deeplotx.pth')
42
+ torch.save(self.state_dict(), f'{self._model_name}.deeplotx')
43
43
  return self
44
44
 
45
45
  def load(self):
46
- self.load_state_dict(torch.load(f'{self._model_name}.deeplotx.pth'))
46
+ self.load_state_dict(torch.load(f'{self._model_name}.deeplotx'))
47
47
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deeplotx
3
- Version: 0.2.19
3
+ Version: 0.2.20
4
4
  Summary: Easy-2-use long text classifier trainers.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deeplotx"
3
- version = "0.2.19"
3
+ version = "0.2.20"
4
4
  description = "Easy-2-use long text classifier trainers."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
File without changes
File without changes
File without changes