After defining the model, the following statement should be removed:
Note that as above we can invoke
net.add() multiple times in succession, but we can also invoke it a single time, passing in multiple layers to be added the network. Thus, we could have equivalently written
net.add(nn.Dense(256, activation='relu'), nn.Dense(10)) .