x-transformers 1.42.14__py3-none-any.whl → 1.42.16__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- x_transformers/x_transformers.py +3 -3
- {x_transformers-1.42.14.dist-info → x_transformers-1.42.16.dist-info}/METADATA +1 -1
- {x_transformers-1.42.14.dist-info → x_transformers-1.42.16.dist-info}/RECORD +6 -6
- {x_transformers-1.42.14.dist-info → x_transformers-1.42.16.dist-info}/LICENSE +0 -0
- {x_transformers-1.42.14.dist-info → x_transformers-1.42.16.dist-info}/WHEEL +0 -0
- {x_transformers-1.42.14.dist-info → x_transformers-1.42.16.dist-info}/top_level.txt +0 -0
x_transformers/x_transformers.py
CHANGED
@@ -1235,9 +1235,9 @@ class Attention(Module):
|
|
1235
1235
|
# maybe learned value residual mixer per token
|
1236
1236
|
|
1237
1237
|
self.to_value_residual_mix = nn.Sequential(
|
1238
|
-
nn.Linear(dim,
|
1238
|
+
nn.Linear(dim, heads),
|
1239
1239
|
nn.Sigmoid(),
|
1240
|
-
Rearrange('b n
|
1240
|
+
Rearrange('b n h -> b h n 1')
|
1241
1241
|
) if learned_value_residual_mix else always(0.5)
|
1242
1242
|
|
1243
1243
|
# attention on attention
|
@@ -1821,7 +1821,7 @@ class AttentionLayers(Module):
|
|
1821
1821
|
is_first_self_attn = False
|
1822
1822
|
elif layer_type == 'c':
|
1823
1823
|
cross_attn_learned_value_residual = learned_value_residual_mix and not is_first_cross_attn
|
1824
|
-
layer = Attention(dim, heads = heads, learned_value_residual_mix =
|
1824
|
+
layer = Attention(dim, heads = heads, learned_value_residual_mix = cross_attn_learned_value_residual, **{**attn_kwargs, **cross_attn_kwargs})
|
1825
1825
|
is_first_cross_attn = False
|
1826
1826
|
elif layer_type == 'f':
|
1827
1827
|
layer = FeedForward(dim, **ff_kwargs)
|
@@ -6,11 +6,11 @@ x_transformers/dpo.py,sha256=xt4OuOWhU8pN3OKN2LZAaC2NC8iiEnchqqcrPWVqf0o,3521
|
|
6
6
|
x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg,9252
|
7
7
|
x_transformers/neo_mlp.py,sha256=XCNnnop9WLarcxap1kGuYc1x8GHvwkZiDRnXOxSl3Po,3452
|
8
8
|
x_transformers/nonautoregressive_wrapper.py,sha256=2NU58hYMgn-4Jzg3mie-mXb0XH_dCN7fjlzd3K1rLUY,10510
|
9
|
-
x_transformers/x_transformers.py,sha256=
|
9
|
+
x_transformers/x_transformers.py,sha256=uppcaaf-6Xzv0EANWNbjE192uK3Bfz1HrwA1cAp1BSg,95129
|
10
10
|
x_transformers/xl_autoregressive_wrapper.py,sha256=CvZMJ6A6PA-Y_bQAhnORwjJBSl6Vjq2IdW5KTdk8NI8,4195
|
11
11
|
x_transformers/xval.py,sha256=7S00kCuab4tWQa-vf-z-XfzADjVj48MoFIr7VSIvttg,8575
|
12
|
-
x_transformers-1.42.
|
13
|
-
x_transformers-1.42.
|
14
|
-
x_transformers-1.42.
|
15
|
-
x_transformers-1.42.
|
16
|
-
x_transformers-1.42.
|
12
|
+
x_transformers-1.42.16.dist-info/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
13
|
+
x_transformers-1.42.16.dist-info/METADATA,sha256=rEC6sZINCmjb2_nir0DX4ZgeVZWdkOeyzSh91vPT7y8,717
|
14
|
+
x_transformers-1.42.16.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
15
|
+
x_transformers-1.42.16.dist-info/top_level.txt,sha256=hO6KGpFuGucRNEtRfme4A_rGcM53AKwGP7RVlRIxS5Q,15
|
16
|
+
x_transformers-1.42.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|