Commit cbf19d4f authored by Chang's avatar Chang Committed by Francisco Massa
Browse files

Use consistent datatypes in DataSet targets (#389)

parent 1dd2d66e
...@@ -60,7 +60,7 @@ class SEMEION(data.Dataset): ...@@ -60,7 +60,7 @@ class SEMEION(data.Dataset):
Returns: Returns:
tuple: (image, target) where target is index of the target class. tuple: (image, target) where target is index of the target class.
""" """
img, target = self.data[index], self.labels[index] img, target = self.data[index], int(self.labels[index])
# doing this so that it is consistent with all other datasets # doing this so that it is consistent with all other datasets
# to return a PIL Image # to return a PIL Image
......
...@@ -89,7 +89,7 @@ class SVHN(data.Dataset): ...@@ -89,7 +89,7 @@ class SVHN(data.Dataset):
Returns: Returns:
tuple: (image, target) where target is index of the target class. tuple: (image, target) where target is index of the target class.
""" """
img, target = self.data[index], self.labels[index] img, target = self.data[index], int(self.labels[index])
# doing this so that it is consistent with all other datasets # doing this so that it is consistent with all other datasets
# to return a PIL Image # to return a PIL Image
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment