kamangir
commited on
Commit
•
dc58ce3
1
Parent(s):
2e7d318
validating single image predict for fashion_mnist - kamangir/bolt#692
Browse files
image_classifier/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
-
version = "1.1.
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
|
|
1 |
name = "image_classifier"
|
2 |
|
3 |
+
version = "1.1.149"
|
4 |
|
5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
image_classifier/__main__.py
CHANGED
@@ -102,18 +102,14 @@ elif args.task == "predict":
|
|
102 |
success, test_images = file.load(f"{args.data_path}/test_images.pyndarray")
|
103 |
|
104 |
if success:
|
105 |
-
logger.info(f"test_images: {string.pretty_shape_of_matrix(test_images)}")
|
106 |
-
|
107 |
_, test_labels = file.load(
|
108 |
f"{args.data_path}/test_labels.pyndarray",
|
109 |
civilized=True,
|
110 |
default=None,
|
111 |
)
|
112 |
|
113 |
-
test_images = test_images / 255.0
|
114 |
-
|
115 |
success = classifier.predict(
|
116 |
-
test_images,
|
117 |
test_labels,
|
118 |
args.output_path,
|
119 |
)
|
|
|
102 |
success, test_images = file.load(f"{args.data_path}/test_images.pyndarray")
|
103 |
|
104 |
if success:
|
|
|
|
|
105 |
_, test_labels = file.load(
|
106 |
f"{args.data_path}/test_labels.pyndarray",
|
107 |
civilized=True,
|
108 |
default=None,
|
109 |
)
|
110 |
|
|
|
|
|
111 |
success = classifier.predict(
|
112 |
+
test_images / 255.0,
|
113 |
test_labels,
|
114 |
args.output_path,
|
115 |
)
|