Skip to content
New issue

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

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

Already on GitHub? # to your account

MLP中出现了nn.Batchnorm2d? #25

Open
swjtulinxi opened this issue Sep 14, 2024 · 1 comment
Open

MLP中出现了nn.Batchnorm2d? #25

swjtulinxi opened this issue Sep 14, 2024 · 1 comment

Comments

@swjtulinxi
Copy link

class MLP(nn.Module):
def init(self,
in_dim: int = 256,
hidden_dim: int = 512,
out_dim: int = 256,
norm_layer=nn.BatchNorm1d,
act_layer=nn.ReLU,
drop: float = 0.):

MLP中出现了nn.batchnorm2d和nn.relu,这两个不是用于卷积的吗,可以用到nn.liner后面,不会出现维度错误?

@pUmpKin-Co
Copy link
Collaborator

您好.不会的,BatchNorm1D可以用于Sequence-Wise Operation. 同时最普通的1x1 Conv=Linear Layer.

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

No branches or pull requests

2 participants