Memory footprint profiling

I wanna get memory footprint profilings and breakdowns when making inference using Pytorch Model. How can I do that for further analysis