x-transformers 2.11.16__py3-none-any.whl → 2.11.17__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/free_transformer.py +5 -0
- {x_transformers-2.11.16.dist-info → x_transformers-2.11.17.dist-info}/METADATA +1 -1
- {x_transformers-2.11.16.dist-info → x_transformers-2.11.17.dist-info}/RECORD +5 -5
- {x_transformers-2.11.16.dist-info → x_transformers-2.11.17.dist-info}/WHEEL +0 -0
- {x_transformers-2.11.16.dist-info → x_transformers-2.11.17.dist-info}/licenses/LICENSE +0 -0
|
@@ -149,6 +149,7 @@ class FreeTransformer(Module):
|
|
|
149
149
|
enc_kwargs: dict = dict(),
|
|
150
150
|
dec_kwargs: dict = dict(),
|
|
151
151
|
kl_loss_weight = 1.,
|
|
152
|
+
latent_dropout_prob = 0.,
|
|
152
153
|
pad_id = -1,
|
|
153
154
|
**kwargs
|
|
154
155
|
):
|
|
@@ -187,6 +188,8 @@ class FreeTransformer(Module):
|
|
|
187
188
|
|
|
188
189
|
self.from_latent_to_condition = nn.Linear(self.binary_mapper.num_codes, dim, bias = False)
|
|
189
190
|
|
|
191
|
+
self.latent_dropout = nn.Dropout(latent_dropout_prob)
|
|
192
|
+
|
|
190
193
|
self.decoder_head = Decoder(
|
|
191
194
|
dim = dim,
|
|
192
195
|
depth = dec_head_depth,
|
|
@@ -380,6 +383,8 @@ class FreeTransformer(Module):
|
|
|
380
383
|
|
|
381
384
|
latents, kl_loss = self.encode_to_latents(tokens_for_latents, mask = encoder_mask, per_token_latents = per_token_latents, return_kl_loss = True)
|
|
382
385
|
|
|
386
|
+
latents = self.latent_dropout(latents)
|
|
387
|
+
|
|
383
388
|
condition = self.from_latent_to_condition(latents)
|
|
384
389
|
|
|
385
390
|
# decoder tail
|
|
@@ -5,7 +5,7 @@ x_transformers/belief_state_wrapper.py,sha256=YLUMk6t2MhFBEw5lHDDHJHcoCxTIkHvxTN
|
|
|
5
5
|
x_transformers/continuous.py,sha256=WwpQCjyVY4PtuEAOFY68zqgklbF9I7AL5w6874YlDe8,13249
|
|
6
6
|
x_transformers/dpo.py,sha256=xt4OuOWhU8pN3OKN2LZAaC2NC8iiEnchqqcrPWVqf0o,3521
|
|
7
7
|
x_transformers/entropy_based_tokenizer.py,sha256=F2lO8-v3aLIcVDVNhu7RR-UtRdlmaaYJzBK9m7OnLE8,5018
|
|
8
|
-
x_transformers/free_transformer.py,sha256=
|
|
8
|
+
x_transformers/free_transformer.py,sha256=F0H_rfb_8_nO4oRbaVDLdfOa8EP4YcUNCOaI2rhkLV0,11541
|
|
9
9
|
x_transformers/gpt_vae.py,sha256=1zyjwgfZr6CRDsh5VMCPSdoCPg-sdX5mXmZ_mn4VyYQ,6082
|
|
10
10
|
x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg,9252
|
|
11
11
|
x_transformers/neo_mlp.py,sha256=XCNnnop9WLarcxap1kGuYc1x8GHvwkZiDRnXOxSl3Po,3452
|
|
@@ -14,7 +14,7 @@ x_transformers/up_wrapper.py,sha256=YC2LN14_7Xx9Wtiek2rtEJ_qHqdfSmKlh3d7Cgxwd80,
|
|
|
14
14
|
x_transformers/x_transformers.py,sha256=5ctPu8tvlbUMrtW360e_LPnoGv6xcgQFsyWdbvLo6Tk,127002
|
|
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.17.dist-info/METADATA,sha256=9gqVZAutVIzE5Xs5ulYv8fZ97-M2vsCacbrWhJmkXm0,96012
|
|
18
|
+
x_transformers-2.11.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
19
|
+
x_transformers-2.11.17.dist-info/licenses/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
|
|
20
|
+
x_transformers-2.11.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|