alphagenome-pytorch 0.0.5__py3-none-any.whl → 0.0.6__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.
- alphagenome_pytorch/alphagenome.py +3 -4
- {alphagenome_pytorch-0.0.5.dist-info → alphagenome_pytorch-0.0.6.dist-info}/METADATA +1 -1
- alphagenome_pytorch-0.0.6.dist-info/RECORD +6 -0
- alphagenome_pytorch-0.0.5.dist-info/RECORD +0 -6
- {alphagenome_pytorch-0.0.5.dist-info → alphagenome_pytorch-0.0.6.dist-info}/WHEEL +0 -0
- {alphagenome_pytorch-0.0.5.dist-info → alphagenome_pytorch-0.0.6.dist-info}/licenses/LICENSE +0 -0
@@ -267,6 +267,8 @@ class SingleToPairwise(Module):
|
|
267
267
|
|
268
268
|
single = self.avg_pool(single)
|
269
269
|
|
270
|
+
pool_seq_len = single.shape[1]
|
271
|
+
|
270
272
|
q, k = self.to_qk(single).chunk(2, dim = -1)
|
271
273
|
q, k = tuple(self.split_heads(t) for t in (q, k))
|
272
274
|
|
@@ -281,10 +283,7 @@ class SingleToPairwise(Module):
|
|
281
283
|
rel_q = relative_shift(einsum(q + q_rel_bias, rel_pos_encoding, 'b n h d, p h d -> b n p h'))
|
282
284
|
rel_k = relative_shift(einsum(k + k_rel_bias, rel_pos_encoding, 'b n h d, p h d -> b n p h'))
|
283
285
|
|
284
|
-
|
285
|
-
crop_padding = (rel_pos_seq - seq) // 2
|
286
|
-
|
287
|
-
rel_q, rel_k = tuple(t[..., crop_padding:(crop_padding + seq), :] for t in (rel_q, rel_k))
|
286
|
+
rel_q, rel_k = tuple(t[..., :pool_seq_len, :] for t in (rel_q, rel_k))
|
288
287
|
|
289
288
|
rel_sim = add('b i j d, b j i d -> b i j d', rel_q, rel_k) * 0.5
|
290
289
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
alphagenome_pytorch/__init__.py,sha256=7plC_YRm0UapNCl9hJEhFxXE-ELGKVy-DtuO5GUQxGI,101
|
2
|
+
alphagenome_pytorch/alphagenome.py,sha256=f0XX7VnbOABwT4WOadQQ64VgYS0-jsqBconX8qaa1eM,14004
|
3
|
+
alphagenome_pytorch-0.0.6.dist-info/METADATA,sha256=kI5ZBXu_SYAQmvXrA6L-QBGS7Bd3Xv2SdPoJ9rnCyjw,3386
|
4
|
+
alphagenome_pytorch-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
alphagenome_pytorch-0.0.6.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
|
6
|
+
alphagenome_pytorch-0.0.6.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
alphagenome_pytorch/__init__.py,sha256=7plC_YRm0UapNCl9hJEhFxXE-ELGKVy-DtuO5GUQxGI,101
|
2
|
-
alphagenome_pytorch/alphagenome.py,sha256=5uxmx-x-6KSu-2aUF4AxM-rYSxXuwnr-0meTNhu2vUM,14086
|
3
|
-
alphagenome_pytorch-0.0.5.dist-info/METADATA,sha256=0W6pkI9-RvNCOixhC1ius8a4-cwpTx7gsA370FLmnsY,3386
|
4
|
-
alphagenome_pytorch-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
alphagenome_pytorch-0.0.5.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
|
6
|
-
alphagenome_pytorch-0.0.5.dist-info/RECORD,,
|
File without changes
|
{alphagenome_pytorch-0.0.5.dist-info → alphagenome_pytorch-0.0.6.dist-info}/licenses/LICENSE
RENAMED
File without changes
|