From 8514032837e0356de1c3b862dfba9327e6c13283 Mon Sep 17 00:00:00 2001 From: Hunor Laczko Date: Wed, 25 Jan 2023 18:04:02 +0000 Subject: [PATCH] bug fix --- aaa_helpers.txt | 2 ++ auto_encoder_static.py | 10 ++++++---- configs/review/config_ae_static.py | 10 ++++------ models/resnet.py | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/aaa_helpers.txt b/aaa_helpers.txt index f8ea6ae..22ba6e0 100644 --- a/aaa_helpers.txt +++ b/aaa_helpers.txt @@ -1,3 +1,5 @@ +nohup python auto_encoder_static.py --name="lhunor_ae_static_r7" > nohup/review/ae_static_r7.out 2>&1 & + one final convolutional layer for smoothing, on the final coordinates skirts!!!! diff --git a/auto_encoder_static.py b/auto_encoder_static.py index f460a25..4227d19 100644 --- a/auto_encoder_static.py +++ b/auto_encoder_static.py @@ -37,7 +37,7 @@ from models.cond_encoder import AutoEncoderNew as AutoEncoder def init_wandb(): - run = wandb.init(project='ae', name=config['name'], notes=config['notes'], dir='/home/workspace/local-data/temp') + run = wandb.init(project='ae', name=config['name'], notes=config['notes'], dir='/home/workspace/local-data/temp', tags=config['tags']) artifact = wandb.Artifact('code', type='code') artifact.add_file('auto_encoder_static.py') artifact.add_file('losses.py') @@ -45,7 +45,7 @@ def init_wandb(): artifact.add_file('models/cond_encoder.py') artifact.add_file('dataset.py') artifact.add_file('convnext/models/convnext_tf.py') - config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.')] + config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.review.')] for config_file_name in config_file_names: artifact.add_file('/'.join(config_file_name.split('.')) + '.py') run.log_artifact(artifact) @@ -138,8 +138,10 @@ def train(): if step == 0: to_log = { **to_log, **{ 'model/summary': wandb.Html(get_summary_html(model)) } } - - wandb.log(to_log, step=step) + if step % 100: + wandb.log(to_log, step=step, commit=True) + else: + wandb.log(to_log, step=step, commit=False) if step % 10000 == 0: manager_enc.save(checkpoint_number=step) diff --git a/configs/review/config_ae_static.py b/configs/review/config_ae_static.py index 4d7c59c..5885a72 100644 --- a/configs/review/config_ae_static.py +++ b/configs/review/config_ae_static.py @@ -34,12 +34,10 @@ config['cond_ae']['activation'] = 'linear' config['gpu'] = '6' config['lr'] = 0.0005 config['name'] = 'static_r7' -config['notes'] = 'convnext + convnext, | \ - \ -| \ - deeper model | \ -linear activation| \ - ' +config['notes'] = 'resnet18 based' +config['tags'] = ['review_7'] + + config['cond_ae']['upscale_output'] = False config['pretrained_model'] = '' diff --git a/models/resnet.py b/models/resnet.py index 277e64d..2bdc2fe 100644 --- a/models/resnet.py +++ b/models/resnet.py @@ -175,8 +175,9 @@ class ResNetTypeI(tf.keras.Model): x = self.pool1(x) x = self.bn1(x, training=training) - x = tf.nn.relu(x) + # x = tf.nn.relu(x) x = self.conv1(x) + x = tf.nn.tanh(x) return x