Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

self.encoder.fc in builder.py #46

Closed
MSutharsan opened this issue Feb 13, 2023 · 0 comments
Closed

self.encoder.fc in builder.py #46

MSutharsan opened this issue Feb 13, 2023 · 0 comments

Comments

@MSutharsan
Copy link

Projectors are defined in builder.py as follows:

 self.encoder.fc = nn.Sequential(nn.Linear(prev_dim, prev_dim, bias=False),
                                        nn.BatchNorm1d(prev_dim),
                                        nn.ReLU(inplace=True), # first layer
                                        nn.Linear(prev_dim, prev_dim, bias=False),
                                        nn.BatchNorm1d(prev_dim),
                                        nn.ReLU(inplace=True), # second layer
                                        self.encoder.fc,
                                        nn.BatchNorm1d(dim, affine=False))

What is the purpose of adding "self.encoder.fc" within nn.Sequential?

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

No branches or pull requests

1 participant