Skip to content

Commit

Permalink
TensorFlow: @_functionBuilder -> @resultBuilder (tensorflow#1174)
Browse files Browse the repository at this point in the history
The function builder attribute has been renamed to `resultBuilder`.
Adjust the sources accordingly.
  • Loading branch information
compnerd authored Dec 30, 2020
1 parent 91b6449 commit a57bc85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/TensorFlow/Layers/Sequential.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ where
L8.TangentVector.VectorSpaceScalar == L9.TangentVector.VectorSpaceScalar,
L9.TangentVector.VectorSpaceScalar == L10.TangentVector.VectorSpaceScalar

@_functionBuilder
@resultBuilder
public struct LayerBuilder {
public static func buildBlock<L1: Module, L2: Layer>(_ l1: L1, _ l2: L2) -> Sequential<L1, L2>
where L1.Output == L2.Input {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TensorFlow/Layers/Sequential.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public typealias Sequential${n}<${generic_parameters(n, ", ")}> = ${sequential_t

%end

@_functionBuilder
@resultBuilder
public struct LayerBuilder {
public static func buildBlock<L1: Module, L2: Layer>(_ l1: L1, _ l2: L2) -> Sequential<L1, L2>
where L1.Output == L2.Input {
Expand Down

0 comments on commit a57bc85

Please sign in to comment.