Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Kale Kundert <[email protected]>
  • Loading branch information
kalekundert committed Nov 21, 2023
1 parent 948307d commit 0d230db
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions escnn/nn/modules/pooling/gaussian_blur.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

from typing import Optional, Union, Tuple

_CONV = {
2: F.conv2d,
3: F.conv3d,
}

class GaussianBlurND(LazyModuleMixin, Module):

def __init__(
Expand Down Expand Up @@ -76,6 +71,7 @@ def __init__(
self.stride = stride
self.edge_correction = edge_correction
self.d = d
self.conv = getattr(F, f'conv{d}d')

if padding is not None:
self.padding = padding
Expand Down Expand Up @@ -130,7 +126,7 @@ def forward(self, x):
return y

def blur(self, x):
return _CONV[self.d](
return self.conv(
x,
self.filter,
stride=self.stride,
Expand Down

0 comments on commit 0d230db

Please sign in to comment.