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

About init networks and optimizer #89

Open
kirk0221 opened this issue Jan 24, 2024 · 0 comments
Open

About init networks and optimizer #89

kirk0221 opened this issue Jan 24, 2024 · 0 comments

Comments

@kirk0221
Copy link

kirk0221 commented Jan 24, 2024

Dear author, i have some question about your work.
In your paper, networks have different their init weight.

The two networks have the same structure and their weights, i.e., θ1 and θ2 , are initialized differently.

Then your code have same init weight(city8.res50v3+CPS, line 82~91)
`
# define and init the model

model = Network(config.num_classes, criterion=criterion,
                pretrained_model=config.pretrained_model,
                norm_layer=BatchNorm2d)

init_weight(model.branch1.business_layer, nn.init.kaiming_normal_,
            BatchNorm2d, config.bn_eps, config.bn_momentum,
            mode='fan_in', nonlinearity='relu')

init_weight(model.branch2.business_layer, nn.init.kaiming_normal_,
            BatchNorm2d, config.bn_eps, config.bn_momentum,
            mode='fan_in', nonlinearity='relu')`

And how do you set the optimizer_l and optimizer_r in the branches of each model?
Can the optimizer be set on each branch without using the group_weight function?

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

1 participant