Skip to content

Why the rec_loss returned from function train_main_network() is divided by args.batch_size in main.py? #1

@Dawn90

Description

@Dawn90
  1. Why the rec_loss returned from function train_main_network() is divided by args.batch_size in main.py? As we know, nn.MSELoss() already returns the mean loss by default.
    line 183: return sim_loss.data/args.batch_size, rec_loss.data/args.batch_size

  2. Are the default parameters just right for the MNIST dataset? I run python main.py for 4500 iterations with the default parameters, and the reconstruction loss had converged to 0.000126. But the visualization of the reconstructed image is almost a black picture. I'm really confused where I make a mistake. Could you give me any instructions?

Thank you verrrrrry much!
Best,
Dong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions