deeplotx 0.2.19__py3-none-any.whl → 0.2.20__py3-none-any.whl
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.
- deeplotx/nn/base_neural_network.py +4 -4
- {deeplotx-0.2.19.dist-info → deeplotx-0.2.20.dist-info}/METADATA +1 -1
- {deeplotx-0.2.19.dist-info → deeplotx-0.2.20.dist-info}/RECORD +6 -6
- {deeplotx-0.2.19.dist-info → deeplotx-0.2.20.dist-info}/WHEEL +0 -0
- {deeplotx-0.2.19.dist-info → deeplotx-0.2.20.dist-info}/licenses/LICENSE +0 -0
- {deeplotx-0.2.19.dist-info → deeplotx-0.2.20.dist-info}/top_level.txt +0 -0
@@ -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.) +
|
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
|
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
|
46
|
+
self.load_state_dict(torch.load(f'{self._model_name}.deeplotx'))
|
47
47
|
return self
|
@@ -3,7 +3,7 @@ deeplotx/encoder/__init__.py,sha256=x7k8IE0FXvDl7kCJGWPsetOHFdvNCiCXHbYOdvo7_JQ,
|
|
3
3
|
deeplotx/encoder/bert_encoder.py,sha256=rdT8YgZzvRoqYqtzPW95ilagSQTAQgUl7mMVetGKxCY,1822
|
4
4
|
deeplotx/encoder/long_text_encoder.py,sha256=yEEtTVZYHJ0W3OSbh7BHm6xI33nJmVYlSrgD5RVcJLY,2967
|
5
5
|
deeplotx/nn/__init__.py,sha256=9gh8rhKqVWtJyvryU_wHPTLEQIorwOBhAQRc0DtNamM,153
|
6
|
-
deeplotx/nn/base_neural_network.py,sha256=
|
6
|
+
deeplotx/nn/base_neural_network.py,sha256=MXuID5bagdHyrFOkoybW1oiXAY2d4FGnzZoR37LZfUI,1566
|
7
7
|
deeplotx/nn/linear_regression.py,sha256=D4mEWVOq6q1Fm2otm57rgZ_E06HJLZBV5k636PprAf4,1520
|
8
8
|
deeplotx/nn/logistic_regression.py,sha256=QAtZp2oyqOW8-1pJWVcahsSM83bzfA68EHObg-wSHHY,463
|
9
9
|
deeplotx/nn/softmax_regression.py,sha256=eUn3mVNlye9ewVdw3McPHZuKbUvvaamsUgFIJMVMgBU,487
|
@@ -13,8 +13,8 @@ deeplotx/trainer/text_binary_classification_trainer.py,sha256=5O-5dwVMCj5EDX9gjJ
|
|
13
13
|
deeplotx/util/__init__.py,sha256=JxqAK_WOOHcYVSTHBT1-WuBwWrPEVDTV3titeVWvNUM,74
|
14
14
|
deeplotx/util/hash.py,sha256=wwsC6kOQvbpuvwKsNQOARd78_wePmW9i3oaUuXRUnpc,352
|
15
15
|
deeplotx/util/read_file.py,sha256=ptzouvEQeeW8KU5BrWNJlXw-vFXVrpS9SkAUxsu6A8A,612
|
16
|
-
deeplotx-0.2.
|
17
|
-
deeplotx-0.2.
|
18
|
-
deeplotx-0.2.
|
19
|
-
deeplotx-0.2.
|
20
|
-
deeplotx-0.2.
|
16
|
+
deeplotx-0.2.20.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
17
|
+
deeplotx-0.2.20.dist-info/METADATA,sha256=NQgRWucDSAI4awAJNf9984IujFRo9PurR1qrqpmWIzA,1573
|
18
|
+
deeplotx-0.2.20.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
19
|
+
deeplotx-0.2.20.dist-info/top_level.txt,sha256=hKg4pVDXZ-WWxkRfJFczRIll1Sv7VyfKCmzHLXbuh1U,9
|
20
|
+
deeplotx-0.2.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|