Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Conditional Diffusion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Diffusion Project
Conditional Diffusion
Commits
24d8c0ef
Commit
24d8c0ef
authored
1 year ago
by
Gonzalo Martin Garcia
Browse files
Options
Downloads
Patches
Plain Diff
commit to switch branches
parent
fb2e6b86
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
trainer/train.py
+5
-5
5 additions, 5 deletions
trainer/train.py
with
5 additions
and
5 deletions
trainer/train.py
+
5
−
5
View file @
24d8c0ef
...
...
@@ -155,9 +155,9 @@ def cdm_trainer(model,
optimizer_state_dict
=
checkpoint
[
'
optimizer
'
]
optimizer
.
load_state_dict
(
optimizer_state_dict
)
# load learning rate schedule state
scheduler_state_dict
=
checkpoint
[
'
scheduler
'
]
scheduler
.
load_state_dict
(
scheduler_state_dict
)
scheduler
.
last_epoch
=
last_epoch
#
scheduler_state_dict = checkpoint['scheduler']
#
scheduler.load_state_dict(scheduler_state_dict)
#
scheduler.last_epoch = last_epoch
# load ema model state
if
ema_training
:
ema
.
module
.
load_state_dict
(
checkpoint
[
'
ema
'
])
...
...
@@ -179,8 +179,8 @@ def cdm_trainer(model,
with
wandb
.
init
(
project
=
'
Unconditional Landscapes
'
,
name
=
run_name
,
entity
=
'
deep-lab-
'
,
id
=
run_name
,
resume
=
True
)
as
run
:
# Log some info
run
.
config
.
learning_rate
=
learning_rate
#
run.config.update({"learning_rate": learning_rate}, allow_val_change=True)
#
run.config.learning_rate = learning_rate
run
.
config
.
update
({
"
learning_rate
"
:
learning_rate
},
allow_val_change
=
True
)
run
.
config
.
optimizer
=
optimizer
.
__class__
.
__name__
#run.watch(model.net)
...
...
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