No offence but your question is very ambiguous. Are you trying to ask people to port your code to a PyTorch version? If yes, I’d suggest you to do this by yourself, line by line. And if you get stuck, then ask