SURE-tools 2.1.88__py3-none-any.whl → 2.1.90__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.
Potentially problematic release.
This version of SURE-tools might be problematic. Click here for more details.
- SURE/PerturbFlow.py +6 -6
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/METADATA +1 -1
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/RECORD +7 -7
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/WHEEL +0 -0
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/entry_points.txt +0 -0
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/licenses/LICENSE +0 -0
- {sure_tools-2.1.88.dist-info → sure_tools-2.1.90.dist-info}/top_level.txt +0 -0
SURE/PerturbFlow.py
CHANGED
|
@@ -59,7 +59,7 @@ class PerturbFlow(nn.Module):
|
|
|
59
59
|
input_size: int,
|
|
60
60
|
codebook_size: int = 200,
|
|
61
61
|
cell_factor_size: int = 0,
|
|
62
|
-
|
|
62
|
+
cell_factor_effect_discrete: bool = False,
|
|
63
63
|
supervised_mode: bool = False,
|
|
64
64
|
z_dim: int = 10,
|
|
65
65
|
z_dist: Literal['normal','studentt','laplacian','cauchy','gumbel'] = 'gumbel',
|
|
@@ -103,7 +103,7 @@ class PerturbFlow(nn.Module):
|
|
|
103
103
|
else:
|
|
104
104
|
self.use_bias = [not zero_bias] * self.cell_factor_size
|
|
105
105
|
#self.use_bias = not zero_bias
|
|
106
|
-
self.enumrate =
|
|
106
|
+
self.enumrate = cell_factor_effect_discrete
|
|
107
107
|
|
|
108
108
|
self.codebook_weights = None
|
|
109
109
|
|
|
@@ -432,8 +432,8 @@ class PerturbFlow(nn.Module):
|
|
|
432
432
|
|
|
433
433
|
if self.cell_factor_size>0:
|
|
434
434
|
if self.enumrate:
|
|
435
|
-
|
|
436
|
-
zn_loc = acs_loc[
|
|
435
|
+
_, ind = torch.topk(ns, 1)
|
|
436
|
+
zn_loc = acs_loc[ind]
|
|
437
437
|
zus = self._total_effects(zn_loc, us)
|
|
438
438
|
else:
|
|
439
439
|
zus = self._total_effects(zns, us)
|
|
@@ -639,8 +639,8 @@ class PerturbFlow(nn.Module):
|
|
|
639
639
|
# else:
|
|
640
640
|
# zus = zus + self.cell_factor_effect[i]([zns,us[:,i].reshape(-1,1)])
|
|
641
641
|
if self.enumrate:
|
|
642
|
-
|
|
643
|
-
zn_loc = acs_loc[
|
|
642
|
+
_, ind = torch.topk(ns, 1)
|
|
643
|
+
zn_loc = acs_loc[ind]
|
|
644
644
|
zus = self._total_effects(zn_loc, us)
|
|
645
645
|
else:
|
|
646
646
|
zus = self._total_effects(zns, us)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
SURE/PerturbFlow.py,sha256=
|
|
1
|
+
SURE/PerturbFlow.py,sha256=B_v-fzSeX72rlidQnTwk169T-uwRoaPoO4INaGW_dFs,55203
|
|
2
2
|
SURE/SURE.py,sha256=g8EhovBxjfpbVJA0AkmVkQ_ZW_JFc8TtkTCg8FCybV4,47750
|
|
3
3
|
SURE/__init__.py,sha256=NOJI_K-eCqPgStXXvgl3wIEMp6d8saMTDYLJ7Ga9MqE,293
|
|
4
4
|
SURE/assembly/__init__.py,sha256=jxZLURXKPzXe21LhrZ09LgZr33iqdjlQy4oSEj5gR2Q,172
|
|
@@ -17,9 +17,9 @@ SURE/utils/__init__.py,sha256=YF5jB-PAHJQ40OlcZ7BCZbsN2q1JKuPT6EppilRXQqM,680
|
|
|
17
17
|
SURE/utils/custom_mlp.py,sha256=HuNb7f8-6RFjsvfEu1XOuNpLrHZkGYHgf8TpJfPSNO0,9382
|
|
18
18
|
SURE/utils/queue.py,sha256=E_5PA5EWcBoGAZj8BkKQnkCK0p4C-4-xcTPqdIXaPXU,1892
|
|
19
19
|
SURE/utils/utils.py,sha256=IUHjDDtYaAYllCWsZyIzqQwaLul6fJRvHRH4vIYcR-c,8462
|
|
20
|
-
sure_tools-2.1.
|
|
21
|
-
sure_tools-2.1.
|
|
22
|
-
sure_tools-2.1.
|
|
23
|
-
sure_tools-2.1.
|
|
24
|
-
sure_tools-2.1.
|
|
25
|
-
sure_tools-2.1.
|
|
20
|
+
sure_tools-2.1.90.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
|
|
21
|
+
sure_tools-2.1.90.dist-info/METADATA,sha256=BkxS7WAeYZH--wcSjqNE8wL2rboHzr4NM1-9U5GnN2E,2678
|
|
22
|
+
sure_tools-2.1.90.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
+
sure_tools-2.1.90.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
|
|
24
|
+
sure_tools-2.1.90.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
|
|
25
|
+
sure_tools-2.1.90.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|