You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by cm...@apache.org on 2019/07/19 17:24:52 UTC

[incubator-mxnet] 05/05: tweaks

This is an automated email from the ASF dual-hosted git repository.

cmeier pushed a commit to branch clojure-autoencoder
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 119f135624df3a99f6aa0dda6391832b8958b83f
Author: gigasquid <cm...@gigasquidsoftware.com>
AuthorDate: Fri Jul 19 13:23:59 2019 -0400

    tweaks
---
 contrib/clojure-package/examples/gan/src/gan/auto_encoder.clj | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/clojure-package/examples/gan/src/gan/auto_encoder.clj b/contrib/clojure-package/examples/gan/src/gan/auto_encoder.clj
index ca3befc..e039a99 100644
--- a/contrib/clojure-package/examples/gan/src/gan/auto_encoder.clj
+++ b/contrib/clojure-package/examples/gan/src/gan/auto_encoder.clj
@@ -29,7 +29,7 @@
                                        :label (str data-dir "train-images-idx3-ubyte")
                                         ;:input-shape [1 28 28]
                                         :input-shape [784]
-                                        :label-shape [784]
+                                        :label-shape [10]
                                         :flat true
                                         :batch-size batch-size
                                         :shuffle true}))
@@ -105,8 +105,10 @@
 
   (train 3)
 
-  
-  (def preds (m/predict-batch model {:data images} ))
+
+  (def my-test-batch (mx-io/next test-data))
+  (def test-images (mx-io/batch-data my-test-batch))
+  (def preds (m/predict-batch model {:data test-images} ))
   (viz/im-sav {:title "preds" :output-path "results/" :x (ndarray/reshape (first preds) [100 1 28 28])})