remove cpu prereqs (#3410)

This commit is contained in:
George Hotz
2024-02-15 13:45:06 +01:00
committed by GitHub
parent a40df14fef
commit 93eceef727
3 changed files with 4 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ def _infer(model: EfficientNet, img, bs=1):
img = preprocess(img)
# run the net
if bs > 1: img = img.repeat(bs, axis=0)
out = model.forward(Tensor(img)).cpu()
out = model.forward(Tensor(img))
return _LABELS[np.argmax(out.numpy()[0])]
chicken_img = Image.open(pathlib.Path(__file__).parent / 'efficientnet/Chicken.jpg')