gigasquid commented on a change in pull request #13864: [Clojure] package infer 
tweaks
URL: https://github.com/apache/incubator-mxnet/pull/13864#discussion_r247320142
 
 

 ##########
 File path: 
contrib/clojure-package/examples/infer/imageclassifier/test/infer/imageclassifier_example_test.clj
 ##########
 @@ -46,24 +46,16 @@
         predictions (classify-single-image classifier image-file)]
     (is (some? predictions))
     (is (= 5 (count predictions)))
-    (is (every? #(= 2 (count %)) predictions))
-    (is (every? #(string? (first %)) predictions))
-    (is (every? #(float? (second %)) predictions))
-    (is (every? #(< 0 (second %) 1) predictions))
-    (is (= ["n02123159 tiger cat"
-            "n02124075 Egyptian cat"
-            "n02123045 tabby, tabby cat"
-            "n02127052 lynx, catamount"
-            "n02128757 snow leopard, ounce, Panthera uncia"]
-           (map first predictions)))))
+    (is (= 5 (count predictions)))
+    (is (= "n02123159 tiger cat" (:class (first predictions))))
+    (is (= (< 0 (:prob (first predictions)) 1)))))
 
 (deftest test-batch-classification
   (let [classifier (create-classifier)
         batch-predictions (classify-images-in-dir classifier image-dir)
         predictions (first batch-predictions)]
     (is (some? batch-predictions))
     (is (= 5 (count predictions)))
-    (is (every? #(= 2 (count %)) predictions))
-    (is (every? #(string? (first %)) predictions))
-    (is (every? #(float? (second %)) predictions))
-    (is (every? #(< 0 (second %) 1) predictions))))
+    (is (= 5 (count predictions)))
 
 Review comment:
   A level of vector wrapping has been taken off so the `first` is no longer 
needed before the count

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to