Upload batched_inference.py
Browse files- batched_inference.py +0 -3
batched_inference.py
CHANGED
@@ -153,14 +153,11 @@ def main():
|
|
153 |
tagging_is_running = multiprocessing.Queue(maxsize=5)
|
154 |
tagging_is_running.put("Running!")
|
155 |
|
156 |
-
# initialize the computation device
|
157 |
if not torch.cuda.is_available():
|
158 |
raise RuntimeError("CUDA is not available!")
|
159 |
|
160 |
model = prepare_model(model_path).to("cuda")
|
161 |
|
162 |
-
# read the training csv file
|
163 |
-
# train dataset
|
164 |
dataset = ImageDataset(image_folder_path, allowed_extensions)
|
165 |
|
166 |
batched_loader = DataLoader(
|
|
|
153 |
tagging_is_running = multiprocessing.Queue(maxsize=5)
|
154 |
tagging_is_running.put("Running!")
|
155 |
|
|
|
156 |
if not torch.cuda.is_available():
|
157 |
raise RuntimeError("CUDA is not available!")
|
158 |
|
159 |
model = prepare_model(model_path).to("cuda")
|
160 |
|
|
|
|
|
161 |
dataset = ImageDataset(image_folder_path, allowed_extensions)
|
162 |
|
163 |
batched_loader = DataLoader(
|