Pytorch useful code and examples