It seems you are trying to replace the model.fc layer with a new dropout and linear layer.
Your current code snippet won’t quite work, as you are first replacing model.fc with nn.Sequential(nn.Dropout()) and are afterwards replacing this new layer with nn.Linear.
If you want to use both new layers, use:
model.fc = nn.Sequential(
    nn.Dropout(p=0.5),
    nn.Linear(512, 3)
)

As a quick test to check if other parts of the code have bugs, try to overfit a small dataset (e.g. just take 10 samples) and make sure your model is able to overfit this small data chunk.
Once this is done, you could try to scale up the use case again by using more data and adding more regularization as the current training seems to be overfitting to the training data.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier