Open mazatov opened 1 year ago
I was a bit confused by the lines 62,63 in your code line 62
Seems like you are converting from numpy to tensor, back to numpy, and then back to tensor. Wouldn't there by an easier way to do this?
image = transforms.ToTensor()(image) image = torch.tensor(np.array([image.numpy()]))
Would this achieve the same?
image = torch.tensor(np.expand_dims(np.rollaxis(image,2)/255.0, -1))
Also is the first dimension of the image, batch? Could we technically pass multiple images here?
I was a bit confused by the lines 62,63 in your code line 62
Seems like you are converting from numpy to tensor, back to numpy, and then back to tensor. Wouldn't there by an easier way to do this?
Would this achieve the same?
Also is the first dimension of the image, batch? Could we technically pass multiple images here?