Pytorch – Inferring linear layer in_features

As of 1.8, PyTorch now has LazyLinear which infers the input dimension:

A torch.nn.Linear module where in_features is inferred.

Leave a Comment