Skip to content

Commit

Permalink
Check strides in spatialfilter.
Browse files Browse the repository at this point in the history
Bad strides were generated by pythorch - issue kraiskil#41
  • Loading branch information
kraiskil committed Mar 9, 2024
1 parent 1b557ba commit 196f9f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/nodes/spatialfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ class SpatialFilter : public Node {
if( strides.size() == 0 )
for( unsigned i=0; i<get_numDataDim(); i++)
strides.push_back(1);
if( get_numDataDim() != strides.size() )
ERROR("Dimension of the stride do not match data dimensions");
for( uint64_t s : strides )
if( s == 0 )
ERROR("Stride of 0");
}

void resolve_kernel_shape(void)
Expand Down

0 comments on commit 196f9f5

Please sign in to comment.