File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
benchmark/src/jmh/scala/com/thoughtworks/deeplearning/benchmark Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ object benchmark {
4242 @ State (Scope .Benchmark )
4343 class FourLayer {
4444
45- @ Param (Array (" 4 " ))
45+ @ Param (Array (" 8 " ))
4646 protected var batchSize : Int = _
4747
4848 @ Param (Array (" 1" , " 2" , " 4" ))
@@ -170,10 +170,15 @@ object benchmark {
170170
171171 @ Benchmark
172172 final def deepLearningDotScala (): Double = {
173- val (coarseClass, batch) = batches.synchronized {
174- batches.next()
173+ try {
174+ val (coarseClass, batch) = batches.synchronized {
175+ batches.next()
176+ }
177+ model.train(coarseClass, batch).blockingAwait
178+ } finally {
179+ System .gc()
180+ System .gc()
175181 }
176- model.train(coarseClass, batch).blockingAwait
177182 }
178183
179184 }
You can’t perform that action at this time.
0 commit comments