This is what i have done…during filtering
previously i have done label = label.long…but when i removed it i got the error
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.DoubleTensor) should be the same
flower_images=np.zeros((210,128,128,3))
for i in flower[‘file’].index:
pl=cv2.imread(“flower_images/”+files[i])
rgb_flower_image = cv2.cvtColor(pl, cv2.COLOR_BGR2RGB)
flower_images[i]=rgb_flower_image
plt.figure(figsize=(3,3))
plt.imshow(flower_images[2])
plt.show()
#convert images to tensors
images=torch.Tensor(flower_images)
images=images.view(210,1,3,128,128)
img=images.double()
label=torch.Tensor(labels)