torch.nn — PyTorch 1.10.1 documentation
pytorch.org › docs › stableA transformer model. nn.TransformerEncoder. TransformerEncoder is a stack of N encoder layers. nn.TransformerDecoder. TransformerDecoder is a stack of N decoder layers. nn.TransformerEncoderLayer. TransformerEncoderLayer is made up of self-attn and feedforward network. nn.TransformerDecoderLayer
layer-to-layer-pytorch · PyPI
https://pypi.org/project/layer-to-layer-pytorch14.09.2020 · from layer_to_layer_pytorch.l2l import Layer2Layer l2l_model = Layer2Layer( model, layers_attr="layers", microbatch_size=100, # fp-16 mixed_precision=True, loss_scale = 128.0 ) And then train the same way 😉 Installation pip install layer-to-layer-pytorch or install with Poetry poetry add layer-to-layer-pytorch 📈 Releases