weight1PlusWeight2.train.map { result =>
result should be(310.0f)
weight2.data should be < 300.0f
weight1.data should be < 10.0f
}

Note

Unlike FloatLayers, FloatLayer in this CumulativeFloatLayers will share Tapes
created in forward pass pass for all dependencies, avoiding re-evaluation
in the case of diamond dependencies in a neural network.