Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
deepdraw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
medai
software
deepdraw
Commits
50d4c408
Commit
50d4c408
authored
5 years ago
by
Tim Laibacher
Browse files
Options
Downloads
Patches
Plain Diff
Add configs
parent
c62538d7
No related branches found
No related tags found
1 merge request
!1
Ssl
Pipeline
#30459
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/ip/binseg/configs/models/m2unetssl0703.py
+39
-0
39 additions, 0 deletions
bob/ip/binseg/configs/models/m2unetssl0703.py
with
39 additions
and
0 deletions
bob/ip/binseg/configs/models/m2unetssl0703.py
0 → 100644
+
39
−
0
View file @
50d4c408
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from
torch.optim.lr_scheduler
import
MultiStepLR
from
bob.ip.binseg.modeling.m2u
import
build_m2unet
import
torch.optim
as
optim
from
torch.nn
import
BCEWithLogitsLoss
from
bob.ip.binseg.utils.model_zoo
import
modelurls
from
bob.ip.binseg.modeling.losses
import
MixJacLoss
from
bob.ip.binseg.engine.adabound
import
AdaBound
##### Config #####
lr
=
0.001
betas
=
(
0.9
,
0.999
)
eps
=
1e-08
weight_decay
=
0
final_lr
=
0.1
gamma
=
1e-3
eps
=
1e-8
amsbound
=
False
scheduler_milestones
=
[
900
]
scheduler_gamma
=
0.1
# model
model
=
build_m2unet
()
# pretrained backbone
pretrained_backbone
=
modelurls
[
'
mobilenetv2
'
]
# optimizer
optimizer
=
AdaBound
(
model
.
parameters
(),
lr
=
lr
,
betas
=
betas
,
final_lr
=
final_lr
,
gamma
=
gamma
,
eps
=
eps
,
weight_decay
=
weight_decay
,
amsbound
=
amsbound
)
# criterion
criterion
=
MixJacLoss
(
lambda_u
=
0.3
,
jacalpha
=
0.7
,
unlabeledjacalpha
=
0.3
)
# scheduler
scheduler
=
MultiStepLR
(
optimizer
,
milestones
=
scheduler_milestones
,
gamma
=
scheduler_gamma
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment