提交 37c76120 编写于 作者: L LielinJiang

fix windows label bug

上级 e08a624b
...@@ -50,7 +50,7 @@ class ImageNetDataset(DatasetFolder): ...@@ -50,7 +50,7 @@ class ImageNetDataset(DatasetFolder):
def __getitem__(self, idx): def __getitem__(self, idx):
img_path, label = self.samples[idx] img_path, label = self.samples[idx]
img = cv2.imread(img_path).astype(np.float32) img = cv2.imread(img_path).astype(np.float32)
label = np.array([label]) label = np.array([label]).astype(np.int64)
return self.transform(img), label return self.transform(img), label
def __len__(self): def __len__(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册