x-transformers 2.11.18__py3-none-any.whl → 2.11.19__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.
Potentially problematic release.
This version of x-transformers might be problematic. Click here for more details.
- x_transformers/x_transformers.py +7 -2
- {x_transformers-2.11.18.dist-info → x_transformers-2.11.19.dist-info}/METADATA +1 -1
- {x_transformers-2.11.18.dist-info → x_transformers-2.11.19.dist-info}/RECORD +5 -5
- {x_transformers-2.11.18.dist-info → x_transformers-2.11.19.dist-info}/WHEEL +0 -0
- {x_transformers-2.11.18.dist-info → x_transformers-2.11.19.dist-info}/licenses/LICENSE +0 -0
x_transformers/x_transformers.py
CHANGED
|
@@ -276,8 +276,13 @@ class ReluSquared(Module):
|
|
|
276
276
|
return F.relu(x) ** 2
|
|
277
277
|
|
|
278
278
|
class SoLU(Module):
|
|
279
|
+
def __init__(self, dim):
|
|
280
|
+
super().__init__()
|
|
281
|
+
self.norm = LayerNorm(dim)
|
|
282
|
+
|
|
279
283
|
def forward(self, x):
|
|
280
|
-
|
|
284
|
+
activated = x.softmax(dim = -1) * x
|
|
285
|
+
return self.norm(activated)
|
|
281
286
|
|
|
282
287
|
# embedding
|
|
283
288
|
|
|
@@ -1262,7 +1267,7 @@ class FeedForward(Module):
|
|
|
1262
1267
|
elif relu_squared:
|
|
1263
1268
|
activation = ReluSquared()
|
|
1264
1269
|
elif solu:
|
|
1265
|
-
activation = SoLU()
|
|
1270
|
+
activation = SoLU(inner_dim)
|
|
1266
1271
|
elif swish:
|
|
1267
1272
|
activation = nn.SiLU()
|
|
1268
1273
|
else:
|
|
@@ -11,10 +11,10 @@ x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg
|
|
|
11
11
|
x_transformers/neo_mlp.py,sha256=XCNnnop9WLarcxap1kGuYc1x8GHvwkZiDRnXOxSl3Po,3452
|
|
12
12
|
x_transformers/nonautoregressive_wrapper.py,sha256=hMQqNimGtchNIe13cR5LZule1V7I1qM5LmY8VQfVdnA,11698
|
|
13
13
|
x_transformers/up_wrapper.py,sha256=YC2LN14_7Xx9Wtiek2rtEJ_qHqdfSmKlh3d7Cgxwd80,7073
|
|
14
|
-
x_transformers/x_transformers.py,sha256=
|
|
14
|
+
x_transformers/x_transformers.py,sha256=xFnA2eW1ZkA_uCdqAtmBU_og3AbarIJQUlNZdVgNVcE,127354
|
|
15
15
|
x_transformers/xl_autoregressive_wrapper.py,sha256=CvZMJ6A6PA-Y_bQAhnORwjJBSl6Vjq2IdW5KTdk8NI8,4195
|
|
16
16
|
x_transformers/xval.py,sha256=AwwYUm8yDAtKQyKJDIhYMsiLTJ_skh3scUFMjp5sda8,8597
|
|
17
|
-
x_transformers-2.11.
|
|
18
|
-
x_transformers-2.11.
|
|
19
|
-
x_transformers-2.11.
|
|
20
|
-
x_transformers-2.11.
|
|
17
|
+
x_transformers-2.11.19.dist-info/METADATA,sha256=SW6GAdWr098WuzOLJrV5h2sY6HutYKam-7n_mXBUZzk,96858
|
|
18
|
+
x_transformers-2.11.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
19
|
+
x_transformers-2.11.19.dist-info/licenses/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
|
20
|
+
x_transformers-2.11.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|