We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e31ec5 commit dcecfadCopy full SHA for dcecfad
benchmark/src/jmh/scala/com/thoughtworks/deeplearning/benchmark/benchmark.scala
@@ -42,7 +42,7 @@ object benchmark {
42
@State(Scope.Benchmark)
43
class FourLayer {
44
45
- @Param(Array("4"))
+ @Param(Array("8"))
46
protected var batchSize: Int = _
47
48
@Param(Array("1", "2", "4"))
@@ -170,10 +170,15 @@ object benchmark {
170
171
@Benchmark
172
final def deepLearningDotScala(): Double = {
173
- val (coarseClass, batch) = batches.synchronized {
174
- batches.next()
+ try {
+ val (coarseClass, batch) = batches.synchronized {
175
+ batches.next()
176
+ }
177
+ model.train(coarseClass, batch).blockingAwait
178
+ } finally {
179
+ System.gc()
180
181
}
- model.train(coarseClass, batch).blockingAwait
182
183
184
0 commit comments