SURE-tools 2.2.24__py3-none-any.whl → 2.4.34__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.
- SURE/DensityFlow.py +130 -65
- SURE/DensityFlow2.py +1422 -0
- SURE/DensityFlowLinear.py +1414 -0
- SURE/EfficientTranscriptomeDecoder.py +552 -0
- SURE/PerturbE.py +1300 -0
- SURE/PerturbationAwareDecoder.py +737 -0
- SURE/SimpleTranscriptomeDecoder.py +567 -0
- SURE/TranscriptomeDecoder.py +511 -0
- SURE/VirtualCellDecoder.py +658 -0
- SURE/__init__.py +17 -1
- SURE/utils/custom_mlp.py +39 -2
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/METADATA +1 -1
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/RECORD +17 -9
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/WHEEL +0 -0
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/entry_points.txt +0 -0
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/licenses/LICENSE +0 -0
- {sure_tools-2.2.24.dist-info → sure_tools-2.4.34.dist-info}/top_level.txt +0 -0
SURE/utils/custom_mlp.py
CHANGED
|
@@ -240,12 +240,49 @@ class ZeroBiasMLP(nn.Module):
|
|
|
240
240
|
y = self.mlp(x)
|
|
241
241
|
mask = torch.zeros_like(y)
|
|
242
242
|
if len(y.shape)==2:
|
|
243
|
-
|
|
243
|
+
if type(x)==list:
|
|
244
|
+
mask[x[1][:,0]>0,:] = 1
|
|
245
|
+
else:
|
|
246
|
+
mask[x[:,0]>0,:] = 1
|
|
244
247
|
elif len(y.shape)==3:
|
|
245
|
-
|
|
248
|
+
if type(x)==list:
|
|
249
|
+
mask[:,x[1][:,0]>0,:] = 1
|
|
250
|
+
else:
|
|
251
|
+
mask[:,x[:,0]>0,:] = 1
|
|
246
252
|
return y*mask
|
|
247
253
|
|
|
248
254
|
|
|
255
|
+
|
|
256
|
+
class ZeroBiasMLP2(nn.Module):
|
|
257
|
+
def __init__(
|
|
258
|
+
self,
|
|
259
|
+
mlp_sizes,
|
|
260
|
+
activation=nn.ReLU,
|
|
261
|
+
output_activation=None,
|
|
262
|
+
post_layer_fct=lambda layer_ix, total_layers, layer: None,
|
|
263
|
+
post_act_fct=lambda layer_ix, total_layers, layer: None,
|
|
264
|
+
allow_broadcast=False,
|
|
265
|
+
use_cuda=False,
|
|
266
|
+
):
|
|
267
|
+
# init the module object
|
|
268
|
+
super().__init__()
|
|
269
|
+
self.mlp = MLP(mlp_sizes=mlp_sizes,
|
|
270
|
+
activation=activation,
|
|
271
|
+
output_activation=output_activation,
|
|
272
|
+
post_layer_fct=post_layer_fct,
|
|
273
|
+
post_act_fct=post_act_fct,
|
|
274
|
+
allow_broadcast=allow_broadcast,
|
|
275
|
+
use_cuda=use_cuda,
|
|
276
|
+
bias=True)
|
|
277
|
+
|
|
278
|
+
# pass through our sequential for the output!
|
|
279
|
+
def forward(self, x):
|
|
280
|
+
y = self.mlp(x)
|
|
281
|
+
mask = torch.zeros_like(y)
|
|
282
|
+
x_sum = torch.sum(x, dim=1)
|
|
283
|
+
mask[x_sum>0,:] = 1
|
|
284
|
+
return y*mask
|
|
285
|
+
|
|
249
286
|
class HDMLP(nn.Module):
|
|
250
287
|
def __init__(
|
|
251
288
|
self,
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
SURE/DensityFlow.py,sha256=
|
|
1
|
+
SURE/DensityFlow.py,sha256=KsngVc_ciwNAxXQZD4JFqJ-sDFLU_3Ra6Nyjcs6NvWo,58878
|
|
2
|
+
SURE/DensityFlow2.py,sha256=BBRCoA4NpU4EjghToOvowo17UtwYokTN75KxWYHTX1E,58404
|
|
3
|
+
SURE/DensityFlowLinear.py,sha256=bYiPHJ6mza4sOXUjlFq7wButu3rNLYZuqWUTtIO06F4,57540
|
|
4
|
+
SURE/EfficientTranscriptomeDecoder.py,sha256=O_x-4edKBU5OJJbOOS-59u3TQElZqhAtOVJMPlpw8m0,21667
|
|
5
|
+
SURE/PerturbE.py,sha256=DxEp-qef--x8-GMZdPfBf8ts8UDDc34h2P5AnpqZ-YM,52265
|
|
6
|
+
SURE/PerturbationAwareDecoder.py,sha256=duhvBvZjOpAk7c2YTfmA2qKbrgVvwT7IW1pxaukq_iU,30231
|
|
2
7
|
SURE/SURE.py,sha256=MXs7iuvcj-lU4dJ_MwKegpL2Rqk2HB4eFfAgHRA3RtA,47744
|
|
3
|
-
SURE/
|
|
8
|
+
SURE/SimpleTranscriptomeDecoder.py,sha256=mLgYYipfRrmuXlpoaxLPfJS009OVwyshdL3nXTJygIE,22285
|
|
9
|
+
SURE/TranscriptomeDecoder.py,sha256=n2tVB8hNVLwSQ1G1Jpd6WzMl2Iw63eK0_Ujk9d48SJY,20982
|
|
10
|
+
SURE/VirtualCellDecoder.py,sha256=z1Z7GRTYmTE3DaSKZueofv138R0J7kGFfnh0a_Lee38,27468
|
|
11
|
+
SURE/__init__.py,sha256=ayUV9hNysHtZxbRK87nnC6cXs-7wAq6FUkllqotrx8E,1123
|
|
4
12
|
SURE/assembly/__init__.py,sha256=jxZLURXKPzXe21LhrZ09LgZr33iqdjlQy4oSEj5gR2Q,172
|
|
5
13
|
SURE/assembly/assembly.py,sha256=6IMdelPOiRO4mUb4dC7gVCoF1Uvfw86-Map8P_jnUag,21477
|
|
6
14
|
SURE/assembly/atlas.py,sha256=ALjmVWutm_tOHTcT1aqOxmuCEQw-XzrtDoMCV_8oXLk,21794
|
|
@@ -14,12 +22,12 @@ SURE/flow/plot_quiver.py,sha256=UbmuScUcgbQHeMmjKmgqxjrIjHhiHx0VWct16UMMwuE,8110
|
|
|
14
22
|
SURE/perturb/__init__.py,sha256=8TP1dSUhXiZzKpFebHZmm8XMMGbUz_OfQ10xu-6uPPY,43
|
|
15
23
|
SURE/perturb/perturb.py,sha256=ey7cxsM1tO1MW4UaE_MLpLHK87CjvXzn2CBPtvv1VZ0,6116
|
|
16
24
|
SURE/utils/__init__.py,sha256=YF5jB-PAHJQ40OlcZ7BCZbsN2q1JKuPT6EppilRXQqM,680
|
|
17
|
-
SURE/utils/custom_mlp.py,sha256=
|
|
25
|
+
SURE/utils/custom_mlp.py,sha256=Rn_PQouxPMSda-KKBYrwVVv3GFFuUmCLxp8cV5LszZo,10580
|
|
18
26
|
SURE/utils/queue.py,sha256=E_5PA5EWcBoGAZj8BkKQnkCK0p4C-4-xcTPqdIXaPXU,1892
|
|
19
27
|
SURE/utils/utils.py,sha256=IUHjDDtYaAYllCWsZyIzqQwaLul6fJRvHRH4vIYcR-c,8462
|
|
20
|
-
sure_tools-2.
|
|
21
|
-
sure_tools-2.
|
|
22
|
-
sure_tools-2.
|
|
23
|
-
sure_tools-2.
|
|
24
|
-
sure_tools-2.
|
|
25
|
-
sure_tools-2.
|
|
28
|
+
sure_tools-2.4.34.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
|
|
29
|
+
sure_tools-2.4.34.dist-info/METADATA,sha256=dRu5kHcrc-T8DPNWOoz5_aNQM_1tc0sJ3BR40ZHGkec,2678
|
|
30
|
+
sure_tools-2.4.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
sure_tools-2.4.34.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
|
|
32
|
+
sure_tools-2.4.34.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
|
|
33
|
+
sure_tools-2.4.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|