sssste:

after that , I need the tensor flow in a pretrain Alexnet model, so I have to renormalize it by using means[0.485, 0.456, 0.406], and std[0.229, 0.224, 0.225], and I need the gradient so I can not convert it to PIL image, how can I do that?


Can you get the data from the Tensor by calling its .data attribute ?