@@ -63,8 +63,8 @@ public override void Backward(Volume<T> outputGradient)
6363 this . OutputActivationGradients = outputGradient ;
6464
6565 // compute gradient wrt weights and data
66- using ( var reshapedInput = this . InputActivation . ReShape ( 1 , 1 , - 1 , this . InputActivation . Shape . GetDimension ( 3 ) ) )
67- using ( var reshapedInputGradients = this . InputActivationGradients . ReShape ( 1 , 1 , - 1 , this . InputActivationGradients . Shape . GetDimension ( 3 ) ) )
66+ using ( var reshapedInput = this . InputActivation . ReShape ( 1 , 1 , - 1 , this . InputActivation . Shape . Dimensions [ 3 ] ) )
67+ using ( var reshapedInputGradients = this . InputActivationGradients . ReShape ( 1 , 1 , - 1 , this . InputActivationGradients . Shape . Dimensions [ 3 ] ) )
6868 {
6969 reshapedInput . ConvolveGradient (
7070 this . Filters , this . OutputActivationGradients ,
@@ -77,7 +77,7 @@ public override void Backward(Volume<T> outputGradient)
7777
7878 protected override Volume < T > Forward ( Volume < T > input , bool isTraining = false )
7979 {
80- using ( var reshapedInput = input . ReShape ( 1 , 1 , - 1 , input . Shape . GetDimension ( 3 ) ) )
80+ using ( var reshapedInput = input . ReShape ( 1 , 1 , - 1 , input . Shape . Dimensions [ 3 ] ) )
8181 {
8282 reshapedInput . DoConvolution ( this . Filters , 0 , 1 , this . OutputActivation ) ;
8383 this . OutputActivation . DoAdd ( this . Bias , this . OutputActivation ) ;
0 commit comments