@@ -79,7 +79,8 @@ public struct Conv1D<Scalar: TensorFlowFloatingPoint>: Layer {
7979 /// - Returns: The output of shape [batch size, output width, output channel count].
8080 ///
8181 /// - Note: Padding size equals zero when using `.valid`.
82- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
82+ @differentiable ( reverse)
83+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
8384 let conv = conv1D (
8485 input,
8586 filter: filter,
@@ -200,7 +201,8 @@ public struct Conv2D<Scalar: TensorFlowFloatingPoint>: Layer {
200201 /// [batch count, output height, output width, output channel count].
201202 ///
202203 /// - Note: Padding size equals zero when using `.valid`.
203- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
204+ @differentiable ( reverse)
205+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
204206 let conv = conv2D (
205207 input,
206208 filter: filter,
@@ -434,7 +436,8 @@ public struct TransposedConv1D<Scalar: TensorFlowFloatingPoint>: Layer {
434436 ///
435437 /// - Parameter input: The input to the layer.
436438 /// - Returns: The output.
437- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
439+ @differentiable ( reverse)
440+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
438441 let batchSize = input. shape [ 0 ]
439442 let w = ( input. shape [ 1 ] - ( 1 * paddingIndex) ) * stride + ( filter. shape [ 0 ] * paddingIndex)
440443 let c = filter. shape [ 2 ]
@@ -535,7 +538,8 @@ public struct TransposedConv2D<Scalar: TensorFlowFloatingPoint>: Layer {
535538 ///
536539 /// - Parameter input: The input to the layer.
537540 /// - Returns: The output.
538- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
541+ @differentiable ( reverse)
542+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
539543 let batchSize = input. shape [ 0 ]
540544 let h = ( input. shape [ 1 ] - ( 1 * paddingIndex) ) * strides. 0 + ( filter. shape [ 0 ] * paddingIndex)
541545 let w = ( input. shape [ 2 ] - ( 1 * paddingIndex) ) * strides. 1 + ( filter. shape [ 1 ] * paddingIndex)
@@ -637,7 +641,8 @@ public struct TransposedConv3D<Scalar: TensorFlowFloatingPoint>: Layer {
637641 ///
638642 /// - Parameter input: The input to the layer.
639643 /// - Returns: The output.
640- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
644+ @differentiable ( reverse)
645+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
641646 let batchSize = input. shape [ 0 ]
642647 let w = ( input. shape [ 1 ] - ( 1 * paddingIndex) ) * strides. 0 + ( filter. shape [ 0 ] * paddingIndex)
643648 let h = ( input. shape [ 2 ] - ( 1 * paddingIndex) ) * strides. 1 + ( filter. shape [ 1 ] * paddingIndex)
@@ -744,7 +749,8 @@ public struct DepthwiseConv2D<Scalar: TensorFlowFloatingPoint>: Layer {
744749 /// [batch count, input height, input width, input channel count]
745750 /// - Returns: The output of shape,
746751 /// [batch count, output height, output width, input channel count * channel multiplier]
747- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
752+ @differentiable ( reverse)
753+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
748754 let conv = depthwiseConv2D (
749755 input,
750756 filter: filter,
@@ -817,7 +823,8 @@ public struct ZeroPadding1D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer
817823 ///
818824 /// - Parameter input: The input to the layer.
819825 /// - Returns: The output.
820- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
826+ @differentiable ( reverse)
827+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
821828 input. padded ( forSizes: [ ( 0 , 0 ) , padding, ( 0 , 0 ) ] )
822829 }
823830}
@@ -850,7 +857,8 @@ public struct ZeroPadding2D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer
850857 ///
851858 /// - Parameter input: The input to the layer.
852859 /// - Returns: The output.
853- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
860+ @differentiable ( reverse)
861+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
854862 input. padded ( forSizes: [ ( 0 , 0 ) , padding. 0 , padding. 1 , ( 0 , 0 ) ] )
855863 }
856864}
@@ -883,7 +891,8 @@ public struct ZeroPadding3D<Scalar: TensorFlowFloatingPoint>: ParameterlessLayer
883891 ///
884892 /// - Parameter input: The input to the layer.
885893 /// - Returns: The output.
886- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
894+ @differentiable ( reverse)
895+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
887896 input. padded ( forSizes: [ ( 0 , 0 ) , padding. 0 , padding. 1 , padding. 2 , ( 0 , 0 ) ] )
888897 }
889898}
@@ -951,7 +960,8 @@ public struct SeparableConv1D<Scalar: TensorFlowFloatingPoint>: Layer {
951960 ///
952961 /// - Parameter input: The input to the layer.
953962 /// - Returns: The output.
954- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
963+ @differentiable ( reverse)
964+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
955965 let depthwise = depthwiseConv2D (
956966 input. expandingShape ( at: 1 ) ,
957967 filter: depthwiseFilter. expandingShape ( at: 1 ) ,
@@ -1072,7 +1082,8 @@ public struct SeparableConv2D<Scalar: TensorFlowFloatingPoint>: Layer {
10721082 ///
10731083 /// - Parameter input: The input to the layer.
10741084 /// - Returns: The output.
1075- @differentiable ( reverse) public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
1085+ @differentiable ( reverse)
1086+ public func callAsFunction( _ input: Tensor < Scalar > ) -> Tensor < Scalar > {
10761087 let depthwise = depthwiseConv2D (
10771088 input,
10781089 filter: depthwiseFilter,
0 commit comments