kamangir commited on
Commit ·
5dbe5c2
1
Parent(s): ba62492
validating fashion_mnist train - 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.68"
|
| 4 |
|
| 5 |
description = "fashion-mnist + hugging-face + awesome-bash-cli"
|
image_classifier/classes.py
CHANGED
|
@@ -110,13 +110,15 @@ class Image_Classifier(object):
|
|
| 110 |
cm = cm / np.sum(cm, axis=1)[:, np.newaxis]
|
| 111 |
logger.debug("confusion_matrix: {}".format(cm))
|
| 112 |
|
| 113 |
-
if not file.save(
|
|
|
|
|
|
|
| 114 |
return False
|
| 115 |
|
| 116 |
if not graphics.render_confusion_matrix(
|
| 117 |
cm,
|
| 118 |
self.class_names,
|
| 119 |
-
"{}/
|
| 120 |
{
|
| 121 |
"header": [
|
| 122 |
" | ".join(host.signature()),
|
|
@@ -140,7 +142,7 @@ class Image_Classifier(object):
|
|
| 140 |
if not graphics.render_distribution(
|
| 141 |
distribution,
|
| 142 |
self.class_names,
|
| 143 |
-
"{}/
|
| 144 |
{
|
| 145 |
"header": [
|
| 146 |
" | ".join(host.signature()),
|
|
|
|
| 110 |
cm = cm / np.sum(cm, axis=1)[:, np.newaxis]
|
| 111 |
logger.debug("confusion_matrix: {}".format(cm))
|
| 112 |
|
| 113 |
+
if not file.save(
|
| 114 |
+
f"{output_path}/image_classifier/model/confusion_matrix.pyndarray", cm
|
| 115 |
+
):
|
| 116 |
return False
|
| 117 |
|
| 118 |
if not graphics.render_confusion_matrix(
|
| 119 |
cm,
|
| 120 |
self.class_names,
|
| 121 |
+
f"{output_path}/image_classifier/model/confusion_matrix.jpg",
|
| 122 |
{
|
| 123 |
"header": [
|
| 124 |
" | ".join(host.signature()),
|
|
|
|
| 142 |
if not graphics.render_distribution(
|
| 143 |
distribution,
|
| 144 |
self.class_names,
|
| 145 |
+
f"{output_path}/image_classifier/model/label_distribution.jpg",
|
| 146 |
{
|
| 147 |
"header": [
|
| 148 |
" | ".join(host.signature()),
|