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

Commit dafbaee

Browse files
authored
Update README to use Differentiable.sequenced(in:through).
1 parent b2f8ec3 commit dafbaee

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ struct Model: Layer {
3030

3131
@differentiable(wrt: (self, input))
3232
func applied(to input: Tensor<Float>, in context: Context) -> Tensor<Float> {
33-
let l1 = layer1.applied(to: input, in: context)
34-
let l2 = layer2.applied(to: l1, in: context)
35-
return layer3.applied(to: l2, in: context)
33+
return l1.sequenced(in: context, through: layer1, layer2, layer3)
3634
}
3735
}
3836
```

0 commit comments

Comments
 (0)