Skip to content

Commit 72957b5

Browse files
authored
Merge pull request #150 from ThoughtWorksInc/intransitiveMap
Use intransitiveMap instead of map
2 parents c103a38 + 88aeaea commit 72957b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DeepLearning/src/main/scala/com/thoughtworks/deeplearning/DeepLearning.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ trait DeepLearning[Differentiable] extends SimulacrumIssue82WorkAround[Different
6262

6363
final def train(differentiable: Differentiable)(implicit monoid: MultiplicativeMonoid[Delta]): Future[Data] = {
6464
val doData = forward(differentiable).flatMap[Data] { tape =>
65-
Do.garbageCollected(tape.backward(Do.now(monoid.one))).map { loss =>
65+
Do.garbageCollected(tape.backward(Do.now(monoid.one))).intransitiveMap { _: Unit =>
6666
tape.data
6767
}
6868
}

0 commit comments

Comments
 (0)