Can you post the code after fixing matplotlib error?
In general, using a larger batch size can cause OOM. Also the reason you were not able to see any process related to PyTorch is because the process actually got killed due to OOM.
Using torch.cuda.empty_cache() can free already occupied memory, but here it looks like your process never really started. Would be better if you post your full code to get more clarity