Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about log_images() on validation_batch_end #370

Open
Lucarqi opened this issue May 29, 2024 · 1 comment
Open

Question about log_images() on validation_batch_end #370

Lucarqi opened this issue May 29, 2024 · 1 comment

Comments

@Lucarqi
Copy link

Lucarqi commented May 29, 2024

how can I save input images and recon images on the validation process end. In code, it seems will save by class ImageLogger in function on_validation_batch_end(). And, on_train_batch_end(). works good , save images in every batch_frequency.
Here is my config file in /configs/autoencoder.

model:
  base_learning_rate: 4.5e-6
  target: ldm.models.autoencoder.AutoencoderKL
  params:
    monitor: "val/rec_loss"
    embed_dim: 4
    lossconfig:
      target: ldm.modules.losses.LPIPSWithDiscriminator
      params:
        disc_start: 30001
        kl_weight: 0.000001
        disc_weight: 0.5

    ddconfig:
      double_z: True
      z_channels: 4
      resolution: 256
      in_channels: 3
      out_ch: 3
      ch: 128
      ch_mult: [ 1,2,4,4 ]  # num_down = len(ch_mult)-1
      num_res_blocks: 2
      attn_resolutions: [ ]
      dropout: 0.0

data:
  target: main.DataModuleFromConfig
  params:
    batch_size: 4
    wrap: True
    train:
      target: ldm.data.renji.RenJiTrain
    validation:
      target: ldm.data.renji.RenJiValidation


lightning:
  callbacks:
    image_logger:
      target: main.ImageLogger
      params:
        batch_frequency: 1000
        max_images: 4
        increase_log_steps: True

  trainer:
    benchmark: True
    accumulate_grad_batches: 2
@tanushreebanerjee
Copy link

Any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants