Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 6045403

Browse files
authored
Removed all uses of 'Differentiable.withoutDerivative()'. (#284)
* Removed all uses of 'Differentiable.withoutDerivative()'. * Made this compatible with the CI toolchain. * Bug fix.
1 parent ccf7fcc commit 6045403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TensorFlow/Layers/Recurrent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public struct RNN<Cell: RNNCell>: Layer {
264264

265265
@differentiable(wrt: (self, inputs))
266266
public func callAsFunction(_ inputs: [Cell.TimeStepInput]) -> [Cell.TimeStepOutput] {
267-
return self(inputs, initialState: cell.zeroState.withoutDerivative())
267+
return self(inputs, initialState: Swift.withoutDerivative(at: cell.zeroState, in: { $0 }))
268268
}
269269

270270
/* TODO: Uncomment once control flow and differentiation through force unwrapping is supported.

0 commit comments

Comments
 (0)