SURE-tools 2.1.27__py3-none-any.whl → 2.1.29__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/PerturbFlow.py CHANGED
@@ -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,29 @@ 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.cell_factor_effect.append(MLP(
200
- [self.latent_dim+1] + self.decoder_hidden_layers + [self.latent_dim],
201
- activation=activate_fct,
202
- output_activation=None,
203
- post_layer_fct=post_layer_fct,
204
- post_act_fct=post_act_fct,
205
- allow_broadcast=self.allow_broadcast,
206
- use_cuda=self.use_cuda,
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=False,
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
+ )
223
+ )
209
224
 
210
225
  self.decoder_concentrate = MLP(
211
226
  [self.latent_dim] + self.decoder_hidden_layers + [self.input_size],
SURE/utils/custom_mlp.py CHANGED
@@ -233,7 +233,7 @@ class ZeroBiasMLP(nn.Module):
233
233
  post_act_fct=post_act_fct,
234
234
  allow_broadcast=allow_broadcast,
235
235
  use_cuda=use_cuda,
236
- bias=False)
236
+ bias=True)
237
237
 
238
238
  # pass through our sequential for the output!
239
239
  def forward(self, x):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.27
3
+ Version: 2.1.29
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=vNxcG3rYg7UqCoTmhYovvOagR8A4DWO1zXSm2FuLQGs,50952
1
+ SURE/PerturbFlow.py,sha256=EDCZaQdz55_Jtxehi9n57wZndKkbXWudCIKB6gL74SQ,51657
2
2
  SURE/SURE.py,sha256=hVEjJtFVQkk_rX3KEaQgWoDTfxpDHf1p6j38UJjNkyY,47457
3
3
  SURE/__init__.py,sha256=NOJI_K-eCqPgStXXvgl3wIEMp6d8saMTDYLJ7Ga9MqE,293
4
4
  SURE/assembly/__init__.py,sha256=jxZLURXKPzXe21LhrZ09LgZr33iqdjlQy4oSEj5gR2Q,172
@@ -14,12 +14,12 @@ SURE/flow/plot_quiver.py,sha256=wC42yLKfXYOGrrd4u9AbZS_6QiPUJ9QBXaOso55LjdA,8110
14
14
  SURE/perturb/__init__.py,sha256=ouxShhbxZM4r5Gf7GmKiutrsmtyq7QL8rHjhgF0BU08,32
15
15
  SURE/perturb/perturb.py,sha256=CqO3xPfNA3cG175tadDidKvGsTu_yKfJRRLn_93awKM,3303
16
16
  SURE/utils/__init__.py,sha256=QJUOfrXzdWSmoM0P3LH8oKEHttzCWqpDy2UF0F0dtN4,673
17
- SURE/utils/custom_mlp.py,sha256=PCnXhJdK_g6z51JJqCdrNGBoOU_SjN5XYAOhB_2BxNo,8105
17
+ SURE/utils/custom_mlp.py,sha256=rHnx9jEef02zfCUdbYVCmbuHcDdIBmRgt__wpdpZvYg,8104
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.27.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
- sure_tools-2.1.27.dist-info/METADATA,sha256=DBiRuz1tIyQ8Dp3wKjapiapkmXjajScDP-6xrFGGrew,2651
22
- sure_tools-2.1.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- sure_tools-2.1.27.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
- sure_tools-2.1.27.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
- sure_tools-2.1.27.dist-info/RECORD,,
20
+ sure_tools-2.1.29.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
+ sure_tools-2.1.29.dist-info/METADATA,sha256=PZSER0TCcl7my4EAFNDTf3rECMT5m7tRrvMImKrF5b0,2651
22
+ sure_tools-2.1.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ sure_tools-2.1.29.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
+ sure_tools-2.1.29.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
+ sure_tools-2.1.29.dist-info/RECORD,,