Skip to content

Commit

Permalink
Fix strides in Conv functional API (#357)
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Fedyunin <valery.fedyunin@abbyy.com>
  • Loading branch information
Valeriy Fedyunin authored Jun 21, 2021
1 parent 81257f9 commit aefabd3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions NeoML/src/Dnn/Layers/3dConvLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ CLayerWrapper<C3dConvLayer> Conv3d( int filterCount,

result->SetFilterHeight( heightParams.FilterSize );
result->SetPaddingHeight( heightParams.Padding );
result->SetStrideWidth( heightParams.Stride );
result->SetStrideHeight( heightParams.Stride );

result->SetFilterWidth( widthParams.FilterSize );
result->SetPaddingWidth( widthParams.Padding );
result->SetStrideHeight( widthParams.Stride );
result->SetStrideWidth( widthParams.Stride );

result->SetFilterDepth( depthParams.FilterSize );
result->SetPaddingDepth( depthParams.Padding );
Expand Down
4 changes: 2 additions & 2 deletions NeoML/src/Dnn/Layers/ChannelwiseConvLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ CLayerWrapper<CChannelwiseConvLayer> ChannelwiseConv( int filterCount,

result->SetFilterHeight( heightParams.FilterSize );
result->SetPaddingHeight( heightParams.Padding );
result->SetStrideWidth( heightParams.Stride );
result->SetStrideHeight( heightParams.Stride );
result->SetDilationHeight( heightParams.Dilation );

result->SetFilterWidth( widthParams.FilterSize );
result->SetPaddingWidth( widthParams.Padding );
result->SetStrideHeight( widthParams.Stride );
result->SetStrideWidth( widthParams.Stride );
result->SetDilationWidth( widthParams.Dilation );

result->SetZeroFreeTerm( isZeroFreeTerm );
Expand Down
4 changes: 2 additions & 2 deletions NeoML/src/Dnn/Layers/ConvLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ CLayerWrapper<CConvLayer> Conv( int filterCount,

result->SetFilterHeight( heightParams.FilterSize );
result->SetPaddingHeight( heightParams.Padding );
result->SetStrideWidth( heightParams.Stride );
result->SetStrideHeight( heightParams.Stride );
result->SetDilationHeight( heightParams.Dilation );

result->SetFilterWidth( widthParams.FilterSize );
result->SetPaddingWidth( widthParams.Padding );
result->SetStrideHeight( widthParams.Stride );
result->SetStrideWidth( widthParams.Stride );
result->SetDilationWidth( widthParams.Dilation );

result->SetZeroFreeTerm( isZeroFreeTerm );
Expand Down
4 changes: 2 additions & 2 deletions NeoML/src/Dnn/Layers/TransposedConvLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ CLayerWrapper<CTransposedConvLayer> TransposedConv( int filterCount,

result->SetFilterHeight( heightParams.FilterSize );
result->SetPaddingHeight( heightParams.Padding );
result->SetStrideWidth( heightParams.Stride );
result->SetStrideHeight( heightParams.Stride );
result->SetDilationHeight( heightParams.Dilation );

result->SetFilterWidth( widthParams.FilterSize );
result->SetPaddingWidth( widthParams.Padding );
result->SetStrideHeight( widthParams.Stride );
result->SetStrideWidth( widthParams.Stride );
result->SetDilationWidth( widthParams.Dilation );

result->SetZeroFreeTerm( isZeroFreeTerm );
Expand Down

0 comments on commit aefabd3

Please sign in to comment.