Thanks alot @ptrblck for your answer. If I had them in a class like:
class Model(nn.Module):

    def __init__():

        super(Model, self).__init__()
        self.layer = nn.Linear(4,6)
        self.dropout = nn.Dropout(p=0.5)
        self.classification = nn.Linear(6,3)

    def forward(x):
        out = self.dropout(self.layer(x))
        return self.classification(out)

I know that if I do model.eval, then dropout would switch to evaluation mode. However, assuming that I do not want to follow the forward function (call the layers manually), do I need to put model.dropout in between, as in:
model = Model()
model.eval()
x = torch.randn(4,4)
out1 = model.layer(x)
# Do I need to put model.dropout(out1)?
out2 = model.classification(out1)

Thanks!