Update tasks/image.py
Browse files- tasks/image.py +13 -13
tasks/image.py
CHANGED
@@ -128,23 +128,23 @@ async def evaluate_image(request: ImageEvaluationRequest):
|
|
128 |
x = self.fc2(x)
|
129 |
return x
|
130 |
|
131 |
-
class CustomDataset(Dataset, labels):
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
|
137 |
-
|
138 |
-
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
|
146 |
|
147 |
-
|
148 |
|
149 |
# Create an instance of the model
|
150 |
model = ImageClassifier()
|
|
|
128 |
x = self.fc2(x)
|
129 |
return x
|
130 |
|
131 |
+
# class CustomDataset(Dataset, labels):
|
132 |
+
# def __init__(self, dataset, transform=None):
|
133 |
+
# self.dataset = dataset
|
134 |
+
# self.transform = transform
|
135 |
+
# self.labels = labels
|
136 |
|
137 |
+
# def __len__(self):
|
138 |
+
# return len(self.dataset)
|
139 |
|
140 |
+
# def __getitem__(self, idx):
|
141 |
+
# image = self.dataset[idx]['image']
|
142 |
+
# label = self.labels[idx]
|
143 |
|
144 |
+
# if self.transform:
|
145 |
+
# image = self.transform(image)
|
146 |
|
147 |
+
# return image, label
|
148 |
|
149 |
# Create an instance of the model
|
150 |
model = ImageClassifier()
|