Skip to content

Instantly share code, notes, and snippets.

@rnyak
Last active September 22, 2021 17:29
Show Gist options
  • Save rnyak/22c0b052b842f11319a7a1a110a8dde5 to your computer and use it in GitHub Desktop.
Save rnyak/22c0b052b842f11319a7a1a110a8dde5 to your computer and use it in GitHub Desktop.
transformer_config = tr.XLNetConfig.build(
d_model=64, n_head=4, n_layer=2, total_seq_length=20
)
# Define the model block including: inputs, masking and transformer block.
body = tr.SequentialBlock(
input_module,
tr.MLPBlock([128, 64]),
tr.TransformerBlock(transformer_config, masking=inputs.masking)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment