Skip to content

Commit

Permalink
Match DLFP 0.17.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueberry committed Apr 27, 2020
1 parent 5a5c5cd commit 682230f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.

(defproject uncomplicate/deep-diamond "0.8.0-SNAPSHOT"
(defproject uncomplicate/deep-diamond "0.8.0-alpha1"
:description "Fast Clojure Deep Learning Library"

:dependencies [[org.clojure/clojure "1.10.1"]
Expand Down
2 changes: 1 addition & 1 deletion src/clojure/uncomplicate/diamond/tensor.clj
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
[ 3.00 4.00 5.00 ]
"
([x y]
(batcher x y ((shape y) 0)))
(batcher x y (min ((shape x) 0)((shape y) 0))))
([x y ^long mb-size]
(api/create-batcher (api/diamond-factory x) x y mb-size)))

Expand Down
3 changes: 2 additions & 1 deletion test/uncomplicate/diamond/dnn_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,5 @@
(time (do (dotimes [i 100]
(forward net [0 1 0 0 false])
(backward net [0 1 0 0 false]))
(net)))))
(net)
nil))))
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
(facts "Adam gradient descent - Boston Housing Prices."
(transfer! x-train (view x-tz))
(transfer! y-train (view y-tz))
(time (train net x-batcher y-batcher quad-cost 80 [] )) => (roughly 4 3)
(time (< 3 (train net x-batcher y-batcher quad-cost 80 [] ) 10)) => true

(transfer! net net-infer)
(net-infer)
(mean-abs-cost) => (roughly 2.5 1.0))))
(< 1.5 (mean-abs-cost) 4) => true)))

(with-release [fact (dnnl-factory)]
(test-boston-regression fact))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
(test-stochastic-gradient-descent-adam fact)
(test-sigmoid-crossentropy-cost fact))

;; (with-release [fact (cudnn-factory)]
;; (bench-wide-layers fact))
;; "Elapsed time: 161.175218 msecs"
#_(with-release [fact (cudnn-factory)]
(bench-wide-layers fact))
;; "Elapsed time: 148.475214 msecs"

0 comments on commit 682230f

Please sign in to comment.