@@ -413,7 +413,7 @@ public struct TransposedConv1D: Layer {
413
413
public func callAsFunction( _ input: Tensor < Float > ) -> Tensor < Float > {
414
414
let batchSize = input. shape [ 0 ]
415
415
let w = ( input. shape [ 1 ] - ( 1 * paddingIndex) ) *
416
- strides. 0 + ( filter. shape [ 0 ] * paddingIndex)
416
+ strides + ( filter. shape [ 0 ] * paddingIndex)
417
417
let c = filter. shape [ 2 ]
418
418
let newShape = Tensor < Int32 > ( [ Int32 ( batchSize) , Int32 ( w) , Int32 ( c) , 1 ] )
419
419
return activation ( conv2DBackpropInput ( input. expandingShape ( at: 1 ) , shape: newShape,
@@ -471,8 +471,8 @@ public extension TransposedConv1D {
471
471
strides: Int = 1 ,
472
472
padding: Padding = . valid,
473
473
activation: @escaping Activation = identity,
474
- seed: ( Int64 , Int64 ) = ( Int64 . random ( in: Int64 . min..< Int64 . max) ,
475
- Int64 . random ( in: Int64 . min..< Int64 . max) )
474
+ seed: ( Int32 , Int32 ) = ( Int32 . random ( in: Int32 . min..< Int32 . max) ,
475
+ Int32 . random ( in: Int32 . min..< Int32 . max) )
476
476
) {
477
477
let filterTensorShape = TensorShape ( [
478
478
filterShape. 0 , filterShape. 1 , filterShape. 2 ] )
@@ -723,8 +723,8 @@ public extension TransposedConv3D {
723
723
strides: ( Int , Int , Int ) = ( 1 , 1 , 1 ) ,
724
724
padding: Padding = . valid,
725
725
activation: @escaping Activation = identity,
726
- seed: ( Int64 , Int64 ) = ( Int64 . random ( in: Int64 . min..< Int64 . max) ,
727
- Int64 . random ( in: Int64 . min..< Int64 . max) )
726
+ seed: ( Int32 , Int32 ) = ( Int32 . random ( in: Int32 . min..< Int32 . max) ,
727
+ Int32 . random ( in: Int32 . min..< Int32 . max) )
728
728
) {
729
729
let filterTensorShape = TensorShape ( [
730
730
filterShape. 0 , filterShape. 1 , filterShape. 2 , filterShape. 3 , filterShape. 4 ] )
0 commit comments