Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different kernel sizes for different dimensions #40

Open
kuangdai opened this issue Apr 2, 2024 · 2 comments
Open

Different kernel sizes for different dimensions #40

kuangdai opened this issue Apr 2, 2024 · 2 comments

Comments

@kuangdai
Copy link

kuangdai commented Apr 2, 2024

Can you maybe add this feature, please?

I think the main change would be

  • From
class ConvolutionalBlock(nn.Module):
    def __init__(
            self,
            dimensions: int,
            in_channels: int,
            out_channels: int,
            normalization: Optional[str] = None,
            kernel_size: int = 3,
            activation: Optional[str] = 'ReLU',
            preactivation: bool = False,
            padding: int = 0,
            padding_mode: str = 'zeros',
            dilation: Optional[int] = None,
            dropout: float = 0,
            ):
  • To
class ConvolutionalBlock(nn.Module):
    def __init__(
            self,
            dimensions: int,
            in_channels: int,
            out_channels: int,
            normalization: Optional[str] = None,
            kernel_size: int = Union[int, Sequence[int]],
            activation: Optional[str] = 'ReLU',
            preactivation: bool = False,
            padding: int = 0,
            padding_mode: str = 'zeros',
            dilation: Optional[int] = None,
            dropout: float = 0,
            ):

I can create a PR if you prefer this way.

@fepegar
Copy link
Owner

fepegar commented Apr 4, 2024

Hi, @kuangdai. Please feel free to open the PR!

@lizhuoq
Copy link
Contributor

lizhuoq commented May 26, 2024

If kernel_size can accept a tuple, doesn't it mean that padding should also accept a tuple?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants