geneflowdecoder 0.1.2__tar.gz → 0.1.3__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.
- {geneflowdecoder-0.1.2/src/geneflowdecoder.egg-info → geneflowdecoder-0.1.3}/PKG-INFO +1 -1
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/pyproject.toml +1 -1
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder/_core.py +10 -8
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder/_version.py +1 -1
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3/src/geneflowdecoder.egg-info}/PKG-INFO +1 -1
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/LICENSE +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/README.md +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/setup.cfg +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder/__init__.py +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder.egg-info/SOURCES.txt +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder.egg-info/dependency_links.txt +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder.egg-info/requires.txt +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder.egg-info/top_level.txt +0 -0
- {geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/tests/test_api.py +0 -0
|
@@ -388,15 +388,17 @@ class GeneFlowDecoder(nn.Module):
|
|
|
388
388
|
z = z.detach()
|
|
389
389
|
return z.clone() if snapshot else z
|
|
390
390
|
|
|
391
|
-
def _velocity(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
B = x_t.shape
|
|
396
|
-
t_emb = self.time_mlp(self._sincos(t)).unsqueeze(1)
|
|
397
|
-
gids = self._gene_ids.unsqueeze(0).expand(B, -1)
|
|
391
|
+
def _velocity(self, x_t: torch.Tensor, t: torch.Tensor,
|
|
392
|
+
z: torch.Tensor) -> torch.Tensor:
|
|
393
|
+
if self.freeze_z:
|
|
394
|
+
z = z.detach()
|
|
395
|
+
B, G = x_t.shape
|
|
396
|
+
t_emb = self.time_mlp(self._sincos(t)).unsqueeze(1) # [B,1,d]
|
|
397
|
+
gids = self._gene_ids[:G].unsqueeze(0).expand(B, -1) # 明确 [B,G]
|
|
398
398
|
h = self.backbone(gids, z) + t_emb
|
|
399
|
-
|
|
399
|
+
v = self.vel_proj(h) # [B,G,1] 或 [B,G]
|
|
400
|
+
v = v.reshape(B, G) # ← 强制对齐,根治错位
|
|
401
|
+
return v
|
|
400
402
|
|
|
401
403
|
# ----------------------------------------------------------------
|
|
402
404
|
# objective
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{geneflowdecoder-0.1.2 → geneflowdecoder-0.1.3}/src/geneflowdecoder.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|