actually assign the tensor
Browse files- inference_gradio.py +1 -1
inference_gradio.py
CHANGED
@@ -139,7 +139,7 @@ def create_tags(image, threshold):
|
|
139 |
if torch.cuda.is_available():
|
140 |
tensor.cuda()
|
141 |
if torch.cuda.get_device_capability()[0] >= 7:
|
142 |
-
tensor.to(dtype=torch.float16, memory_format=torch.channels_last)
|
143 |
|
144 |
with torch.no_grad():
|
145 |
logits = model(tensor)
|
|
|
139 |
if torch.cuda.is_available():
|
140 |
tensor.cuda()
|
141 |
if torch.cuda.get_device_capability()[0] >= 7:
|
142 |
+
tensor = tensor.to(dtype=torch.float16, memory_format=torch.channels_last)
|
143 |
|
144 |
with torch.no_grad():
|
145 |
logits = model(tensor)
|