this is slowly becoming actually useful
This commit is contained in:
1 parent
d518ddb63d
commit
8628600ea3
15 files changed
+190
-176
No files matched your search
@@ -1,5 +1,5 @@
|
||||
from models.simple_mnist_classifier.lightning_module import LitModel
|
||||
from models.simple_mnist_classifier import transforms
|
||||
from lightning_modules.data_modules import transforms
|
||||
from PIL import Image
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ def predict():
|
||||
img = Image.open("../../example_img.png").convert("L")
|
||||
|
||||
# preprocess
|
||||
img = transforms.test_preprocess(img)
|
||||
img = transforms.mnist_test_preprocess(img)
|
||||
img = img.reshape((1, *img.size())) # reshape to form batch of size 1
|
||||
|
||||
# inference
|
||||
|
||||
Reference in new issue
Block a user