I think that would be a great feature, but sadly it doesn’t exist (yet).
For now, there is a profiler which helps you find bottlenecks in your model. It gives no info about memory consumption; only time taken. But there is often a correlation between time and memory!
Take a look:
http://pytorch.org/docs/0.3.0/autograd.html#profiler 11