Stonesjtu / pytorch_memlab

Profiling and inspecting memory in pytorch
MIT License
1.01k stars 37 forks source link

Variable 'tensor_names' referenced before assignment #22

Closed sidmani closed 3 years ago

sidmani commented 3 years ago

https://github.com/Stonesjtu/pytorch_memlab/blob/ec9a72fc302981ddc3ee56d6e16694610d646c36/pytorch_memlab/mem_reporter.py#L37

The variable tensor_names is referenced before assignment if no model is passed into the MemReporter. Need to move it into the above if statement.

Stonesjtu commented 3 years ago

Thanks for reporting this issue, will do this week.