How to monitor GPU memory usage when training a DNN?
I give a result example. I want to ask how to get the data like this graph.


You can use pytorch commands such as torch.cuda.memory_stats to get information about current GPU memory usage and then create a temporal graph based on these reports.
