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

[F] Fix SeparableConv2dBlock module list error #7

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chameleon/base/blocks/conv_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def __init__(
groups=in_channels,
bias=False,
)
if inner_norm is not None:
self.inner_norm = COMPONENTS.build(inner_norm) if isinstance(inner_norm, dict) else inner_norm
if inner_act is not None:
self.inner_act = COMPONENTS.build(inner_act) if isinstance(inner_act, dict) else inner_act
self.pw_conv = nn.Conv2d(
in_channels,
out_channels,
Expand All @@ -75,10 +79,6 @@ def __init__(
padding=0,
bias=bias,
)
if inner_norm is not None:
self.inner_norm = COMPONENTS.build(inner_norm) if isinstance(inner_norm, dict) else inner_norm
if inner_act is not None:
self.inner_act = COMPONENTS.build(inner_act) if isinstance(inner_act, dict) else inner_act
if norm is not None:
self.norm = COMPONENTS.build(norm) if isinstance(norm, dict) else norm
if act is not None:
Expand Down