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

Removed all uses of 'Differentiable.withoutDerivative()'. #284

Merged
merged 3 commits into from
Jun 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/TensorFlow/Layers/Recurrent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public struct RNN<Cell: RNNCell>: Layer {

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

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