How to solve pytorch freezing issue?

This tutorial might be a good starter.