This commit is contained in:
2022-06-16 16:45:21 +00:00
parent 81abb9141c
commit e712e456bc
6 changed files with 15 additions and 13 deletions
+6 -6
View File
@@ -17,8 +17,8 @@ from losses import d_logistic, d_logistic_r1_reg, g_logistic_non_saturating, g_l
from losses import collision_loss as collision_penalty
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
run = wandb.init(config=tf.compat.v1.flags.FLAGS, sync_tensorboard=True, project='stylegan', name='test_conditioned_10(test-13)', notes='same as test-12 but double discriminator feature sizes')
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
run = wandb.init(config=tf.compat.v1.flags.FLAGS, sync_tensorboard=True, project='stylegan', name='test_conditioned_13(test-16)', notes='learning offsets, all losses from the start')
artifact = wandb.Artifact('code', type='code')
artifact.add_file('train.py')
artifact.add_file('losses.py')
@@ -206,7 +206,7 @@ class Trainer(object):
mesh_pred = uv2mesh(fake_images)
e_loss = edge_loss(mesh_pred, mesh_static, mesh_mask)
c_loss = 0.0 #collision_penalty(mesh_pred, mesh_body_posed, mesh_mask)
c_loss = collision_penalty(mesh_pred, mesh_body_posed, mesh_mask)
m_loss = 0.0 # uv_mask_loss(fake_images, uv_mask)
# scale loss
@@ -235,7 +235,7 @@ class Trainer(object):
mesh_pred = uv2mesh(fake_images)
e_loss = edge_loss(mesh_pred, mesh_static, mesh_mask)
c_loss = 0.0 #collision_penalty(mesh_pred, mesh_body_posed, mesh_mask)
c_loss = collision_penalty(mesh_pred, mesh_body_posed, mesh_mask)
m_loss = 0.0 # uv_mask_loss(fake_images, uv_mask)
# scale loss
@@ -366,7 +366,7 @@ class Trainer(object):
# if step > self.enable_unsupervised_losses:
# self.unsupervised_coeff = (step / 40000)
# self.unsupervised_coeff = 1
# update g_clone
self.g_clone.set_as_moving_average_of(self.generator)
@@ -573,7 +573,7 @@ def main():
'train_res': args['train_res'],
}
trainer = Trainer(training_parameters, name=f'stylegan2-test-13-{args["train_res"]}x{args["train_res"]}')
trainer = Trainer(training_parameters, name=f'stylegan2-test-16-{args["train_res"]}x{args["train_res"]}')
trainer.train(dist_dataset, strategy)
return