SURE-tools 2.1.21__py3-none-any.whl → 2.1.22__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 CHANGED
@@ -196,7 +196,7 @@ class PerturbFlow(nn.Module):
196
196
  if self.cell_factor_size>0:
197
197
  self.cell_factor_effect = nn.ModuleList()
198
198
  for i in np.arange(self.cell_factor_size):
199
- self.cell_factor_effect.append(MLP(
199
+ self.cell_factor_effect.append(ZeroBiasMLP(
200
200
  [self.latent_dim+1] + hidden_sizes + [self.latent_dim],
201
201
  activation=activate_fct,
202
202
  output_activation=None,
SURE/utils/custom_mlp.py CHANGED
@@ -212,3 +212,33 @@ class MLP(nn.Module):
212
212
 
213
213
 
214
214
 
215
+
216
+ class ZeroBiasMLP(nn.Module):
217
+ def __init__(
218
+ self,
219
+ mlp_sizes,
220
+ activation=nn.ReLU,
221
+ output_activation=None,
222
+ post_layer_fct=lambda layer_ix, total_layers, layer: None,
223
+ post_act_fct=lambda layer_ix, total_layers, layer: None,
224
+ allow_broadcast=False,
225
+ use_cuda=False,
226
+ ):
227
+ # init the module object
228
+ super().__init__()
229
+ self.mlp = MLP(mlp_sizes=mlp_sizes,
230
+ activation=activation,
231
+ output_activation=output_activation,
232
+ post_layer_fct=post_layer_fct,
233
+ post_act_fct=post_act_fct,
234
+ allow_broadcast=allow_broadcast,
235
+ use_cuda=use_cuda,
236
+ bias=False)
237
+
238
+ # pass through our sequential for the output!
239
+ def forward(self, x):
240
+ y = self.mlp(x)
241
+ mask = torch.zeros_like(y)
242
+ mask[x[1]>0,:] = 1
243
+ return y*mask
244
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.21
3
+ Version: 2.1.22
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -1,4 +1,4 @@
1
- SURE/PerturbFlow.py,sha256=P5YebRbhyEIueyStdaMkFvLq43MJSBCcYd-pI09eTBQ,50938
1
+ SURE/PerturbFlow.py,sha256=gHrIHTAmFsG3FwS1ov7K3KwRMS0aw_IFQM-3HDIWnaA,50946
2
2
  SURE/SURE.py,sha256=xMD6VBYsgk-bZ_xBWzpdGyxEAleonNRoPkZAxAX467s,47444
3
3
  SURE/SURE2.py,sha256=8wlnMwb1xuf9QUksNkWdWx5ZWq-xIy9NLx8RdUnE82o,48501
4
4
  SURE/__init__.py,sha256=NOJI_K-eCqPgStXXvgl3wIEMp6d8saMTDYLJ7Ga9MqE,293
@@ -16,12 +16,12 @@ SURE/flow/quiver.py,sha256=_euFqSaRrDoZ_oOabOx20LOoUTJ__XPhLW-vzLNQfAo,1859
16
16
  SURE/perturb/__init__.py,sha256=ouxShhbxZM4r5Gf7GmKiutrsmtyq7QL8rHjhgF0BU08,32
17
17
  SURE/perturb/perturb.py,sha256=CqO3xPfNA3cG175tadDidKvGsTu_yKfJRRLn_93awKM,3303
18
18
  SURE/utils/__init__.py,sha256=Htqv4KqVKcRiaaTBsR-6yZ4LSlbhbzutjNKXGD9-uds,660
19
- SURE/utils/custom_mlp.py,sha256=IlW5L_YEhtn0guHlGyvGLRjJ5JOIWs4qB7BPi1Dmq9U,7116
19
+ SURE/utils/custom_mlp.py,sha256=WYIrCqZypa2a4icrXnknPULIC_rSxhA3qYRumzq68X0,8100
20
20
  SURE/utils/queue.py,sha256=E_5PA5EWcBoGAZj8BkKQnkCK0p4C-4-xcTPqdIXaPXU,1892
21
21
  SURE/utils/utils.py,sha256=IUHjDDtYaAYllCWsZyIzqQwaLul6fJRvHRH4vIYcR-c,8462
22
- sure_tools-2.1.21.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
23
- sure_tools-2.1.21.dist-info/METADATA,sha256=5pPz0o1rpF7udNtmSfrCFE14qcuhl-86De2HkA_fUww,2651
24
- sure_tools-2.1.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- sure_tools-2.1.21.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
26
- sure_tools-2.1.21.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
27
- sure_tools-2.1.21.dist-info/RECORD,,
22
+ sure_tools-2.1.22.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
23
+ sure_tools-2.1.22.dist-info/METADATA,sha256=e6LTOaCIRdsq4LgyYrF-iwfvWHMX1twop4BQsci3Vog,2651
24
+ sure_tools-2.1.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ sure_tools-2.1.22.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
26
+ sure_tools-2.1.22.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
27
+ sure_tools-2.1.22.dist-info/RECORD,,