You need to allocate the tensor in RAM by using
model(img_test.unsqueeze(0).cuda()).deatch().cpu().clone().numpy()

which means that you are going to:
deatch --> cut computational graph
cpu --> allocate tensor in RAM
clone --> clone the tensor not to modify the output in-place
numpy --> port tensor to numpy
Note: permute is a pytorch function, if you map it into a numpy tensor you should use transpose