Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Swin-Transformer-Object-Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wanggh
Swin-Transformer-Object-Detection
Commits
a002b205
Commit
a002b205
authored
3 years ago
by
wanggh
Browse files
Options
Downloads
Patches
Plain Diff
before merge
parent
7c7132fa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/swin/mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_adamw_1x_coco.py
+11
-10
11 additions, 10 deletions
...swin_tiny_patch4_window7_mstrain_480-800_adamw_1x_coco.py
tools/gen_checkpoint.py
+5
-5
5 additions, 5 deletions
tools/gen_checkpoint.py
with
16 additions
and
15 deletions
configs/swin/mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_adamw_1x_coco.py
+
11
−
10
View file @
a002b205
...
...
@@ -66,15 +66,16 @@ optimizer = dict(_delete_=True, type='AdamW', lr=0.0001, betas=(0.9, 0.999), wei
'
relative_position_bias_table
'
:
dict
(
decay_mult
=
0.
),
'
norm
'
:
dict
(
decay_mult
=
0.
)}))
lr_config
=
dict
(
step
=
[
8
,
11
])
runner
=
dict
(
type
=
'
EpochBasedRunnerAmp
'
,
max_epochs
=
12
)
#runner = dict(type='EpochBasedRunnerAmp', max_epochs=12)
runner
=
dict
(
type
=
'
EpochBasedRunner
'
,
max_epochs
=
12
)
# do not use mmdet version fp16
fp16
=
None
optimizer_config
=
dict
(
type
=
"
DistOptimizerHook
"
,
update_interval
=
1
,
grad_clip
=
None
,
coalesce
=
True
,
bucket_size_mb
=-
1
,
use_fp16
=
True
,
)
#
fp16 = None
#
optimizer_config = dict(
#
type="DistOptimizerHook",
#
update_interval=1,
#
grad_clip=None,
#
coalesce=True,
#
bucket_size_mb=-1,
#
use_fp16=True,
#
)
This diff is collapsed.
Click to expand it.
tools/gen_checkpoint.py
+
5
−
5
View file @
a002b205
...
...
@@ -23,8 +23,8 @@ def get_sd(filename, return_sd=True):
def
merge
(
target
,
backbone
,
head
):
tsd
=
target
[
'
state_dict
'
]
bsd
=
target
[
'
state_dict
'
]
hsd
=
target
[
'
state_dict
'
]
bsd
=
backbone
[
'
state_dict
'
]
hsd
=
head
[
'
state_dict
'
]
for
key
in
tsd
.
keys
():
if
'
backbone
'
in
key
:
assert
key
in
bsd
...
...
@@ -41,11 +41,11 @@ def main():
backbone
=
get_sd
(
args
.
backbone
,
return_sd
=
False
)
head
=
get_sd
(
args
.
head
,
return_sd
=
False
)
target
=
backbone
.
copy
()
#
target = head.copy()
#
target = backbone.copy()
target
=
head
.
copy
()
target
=
merge
(
target
,
backbone
,
head
)
os
.
makedirs
(
os
.
path
.
basename
(
args
.
out
),
exist_ok
=
True
)
#
os.makedirs(os.path.basename(args.out), exist_ok=True)
torch
.
save
(
target
,
args
.
out
)
print
(
"
saved checkpoint in {}
"
.
format
(
args
.
out
))
...
...
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