mirror of
https://github.com/fastai/fastbook.git
synced 2025-04-05 02:10:48 +00:00
Merge 92b59e14e9
into e8baa81d89
This commit is contained in:
commit
367595c30a
@ -758,8 +758,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"img = PILImage.create(uploader.data[0])\n",
|
"is_cat,_,probs = learn.predict(uploader.data[0])\n",
|
||||||
"is_cat,_,probs = learn.predict(img)\n",
|
|
||||||
"print(f\"Is this a cat?: {is_cat}.\")\n",
|
"print(f\"Is this a cat?: {is_cat}.\")\n",
|
||||||
"print(f\"Probability it's a cat: {probs[1].item():.6f}\")"
|
"print(f\"Probability it's a cat: {probs[1].item():.6f}\")"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user