My apologies, I meant nn.ReLU. I tried using nn.Dropout with inplace=True in nn.Sequential and got an error saying:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
Maybe this is caused by setting inplace=True?