Hi, please give me some advice.
This warning below is always occur when I run my test code.
UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at …\c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
The recognition results seem not weird, so probably this error is not affecting the processing at this moment, but I am curious if it is 100% ok or not.
I have found a doc related to named_tensor in the link below:
https://pytorch.org/docs/stable/named_tensor.html
I am not using any methods related to tensor name in my code, so it’s hard to find why this warning occur.
Below is my code for test:
test_transforms = transforms.Compose([transforms.Resize((224,224)),
transforms.ToTensor(),
transforms.Lambda(lambda x: x.repeat(3, 1, 1)),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
real = Image.open(image)
inputimage = test_transforms(real).unsqueeze_(0)
img_variable = Variable(inputimage)
img_variable = img_variable.to(device)
output = model(img_variable)
stm = nn.Softmax(dim=1)