Seems good. Since the activations (nn.ReLU and nn.Softmax in your example) don’t store learnable parameters, they can be easily replaced with their functional counterparts from torch.nn.functional (F.relu and F.softmax), but this is not necessary (just an additional improvement).