SURE-tools 2.1.28__tar.gz → 2.1.30__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.
Potentially problematic release.
This version of SURE-tools might be problematic. Click here for more details.
- {sure_tools-2.1.28 → sure_tools-2.1.30}/PKG-INFO +1 -1
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/PerturbFlow.py +26 -10
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/utils/custom_mlp.py +1 -1
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/PKG-INFO +1 -1
- {sure_tools-2.1.28 → sure_tools-2.1.30}/setup.py +1 -1
- {sure_tools-2.1.28 → sure_tools-2.1.30}/LICENSE +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/README.md +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/SURE.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/assembly/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/assembly/assembly.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/assembly/atlas.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/atac/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/atac/utils.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/codebook/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/codebook/codebook.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/flow/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/flow/flow_stats.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/flow/plot_quiver.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/perturb/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/perturb/perturb.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/utils/__init__.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/utils/queue.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE/utils/utils.py +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/SOURCES.txt +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/dependency_links.txt +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/entry_points.txt +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/requires.txt +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/SURE_tools.egg-info/top_level.txt +0 -0
- {sure_tools-2.1.28 → sure_tools-2.1.30}/setup.cfg +0 -0
|
@@ -73,6 +73,7 @@ class PerturbFlow(nn.Module):
|
|
|
73
73
|
config_enum: str = 'parallel',
|
|
74
74
|
use_cuda: bool = False,
|
|
75
75
|
seed: int = 42,
|
|
76
|
+
bias: bool = False,
|
|
76
77
|
dtype = torch.float32, # type: ignore
|
|
77
78
|
):
|
|
78
79
|
super().__init__()
|
|
@@ -96,6 +97,7 @@ class PerturbFlow(nn.Module):
|
|
|
96
97
|
self.post_layer_fct = post_layer_fct
|
|
97
98
|
self.post_act_fct = post_act_fct
|
|
98
99
|
self.hidden_layer_activation = hidden_layer_activation
|
|
100
|
+
self.bias = bias
|
|
99
101
|
|
|
100
102
|
self.codebook_weights = None
|
|
101
103
|
|
|
@@ -196,16 +198,30 @@ class PerturbFlow(nn.Module):
|
|
|
196
198
|
if self.cell_factor_size>0:
|
|
197
199
|
self.cell_factor_effect = nn.ModuleList()
|
|
198
200
|
for i in np.arange(self.cell_factor_size):
|
|
199
|
-
self.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
201
|
+
if self.bias:
|
|
202
|
+
self.cell_factor_effect.append(MLP(
|
|
203
|
+
[self.latent_dim+1] + self.decoder_hidden_layers + [self.latent_dim],
|
|
204
|
+
activation=activate_fct,
|
|
205
|
+
output_activation=None,
|
|
206
|
+
post_layer_fct=post_layer_fct,
|
|
207
|
+
post_act_fct=post_act_fct,
|
|
208
|
+
allow_broadcast=self.allow_broadcast,
|
|
209
|
+
use_cuda=self.use_cuda,
|
|
210
|
+
bias=True,
|
|
211
|
+
)
|
|
212
|
+
)
|
|
213
|
+
else:
|
|
214
|
+
self.cell_factor_effect.append(MLP(
|
|
215
|
+
[self.latent_dim+1] + self.decoder_hidden_layers + [self.latent_dim],
|
|
216
|
+
activation=activate_fct,
|
|
217
|
+
output_activation=None,
|
|
218
|
+
post_layer_fct=post_layer_fct,
|
|
219
|
+
post_act_fct=post_act_fct,
|
|
220
|
+
allow_broadcast=self.allow_broadcast,
|
|
221
|
+
use_cuda=self.use_cuda,
|
|
222
|
+
bias=False,
|
|
223
|
+
)
|
|
224
|
+
)
|
|
209
225
|
|
|
210
226
|
self.decoder_concentrate = MLP(
|
|
211
227
|
[self.latent_dim] + self.decoder_hidden_layers + [self.input_size],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|