PaddlePaddle / PaddleGAN

PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, Wav2Lip, picture repair, image editing, photo2cartoon, image style transfer, GPEN, and so on.
Apache License 2.0
7.75k stars 1.23k forks source link

在使用pix2pix模型训练自己的数据集时,打印生成器生成的fake_B时,发现里面全为0 #830

Open deepxiaobai opened 6 months ago

deepxiaobai commented 6 months ago

fake_B: Tensor(shape=[1, 3, 256, 256], dtype=float32, place=Place(gpu:0), stop_gradient=False, [[[[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]],

     [[0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      ...,
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.]],

     [[0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      ...,
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.],
      [0., 0., 0., ..., 0., 0., 0.]]]])
JunnYu commented 5 months ago

你好,建议先使用提供的内置数据集进行训练尝试,看看是不是代码,环境,版本导致的问题。如果不是的话,可能是你的训练配置,训练数据存在问题。 另外,如果有图像和视频生成的需求,可以使用我们新的跨模态工具: https://github.com/PaddlePaddle/PaddleMIX/tree/develop