Skip to content

【Hackathon 8th No.23】Improved Training of Wasserstein GANs 论文复现 #1146

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

Open
wants to merge 40 commits into
base: develop
Choose a base branch
from

Conversation

XvLingWYY
Copy link

PR types

New Features

PR changes

Others

Describe

Add wgangp

Copy link

paddle-bot bot commented Apr 27, 2025

Thanks for your contribution!

@XvLingWYY
Copy link
Author

@robinbg

@XvLingWYY XvLingWYY changed the title 【Hackathon 8th No.23】RFC:Improved Training of Wasserstein GANs 论文复现 【Hackathon 8th No.23】Improved Training of Wasserstein GANs 论文复现 Apr 27, 2025
Copy link
Contributor

@lijialin03 lijialin03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢提交~
当前代码直接运行时,即使修改yaml中的参数为:epochs: 20000epochs_dis: 5训练后,再评估时得到的预测结果与target也不相同,请先检查参数/代码,谢谢

@@ -0,0 +1,349 @@
# WGANGP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请一并修改mkdocs.yml和docs/index.md

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

python wgangp_cifar10.py
```
```sh
python wgangp_minst.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python wgangp_mnist.py

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

Comment on lines 21 to 27
python wgangp_cifar10.py model=eval
```
```sh
python wgangp_mnist.py model=eval
```
```sh
python wgangp_toy.py model=eval
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mode=eval

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

Comment on lines 95 to 99
epochs: 5
epochs_dis: 1
iters_per_epoch_dis: 1
epochs_gen: 1
iters_per_epoch_gen: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将相关参数修改为可以得到正确结果的参数,其他案例也一样

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

Comment on lines 79 to 82
show_mnist(
fake_data[i],
f"{cfg.output_dir}/image{batch_idx}_{i}.png",
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将target也保存一下,以便直观显示模型效果,如添加代码:

show_mnist(
    input_["real_data"][i],
    f"{cfg.output_dir}/image_real_{batch_idx}_{i}.png",
)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

Comment on lines 74 to 78
for i in range(
cfg["EVAL"]["batch_size"]
if cfg["EVAL"]["batch_size"] < cfg.VIS.num
else cfg.VIS.num
):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否可以将eval的batch_size设置为1,以去掉这层循环

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

@@ -0,0 +1,893 @@
import math
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看名称,模型和案例强相关,如果不能提出base_model的话,建议分开三个文件

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的谢谢老师,已完成此项修改。

@XvLingWYY
Copy link
Author

所有模型和训练日志
通过网盘分享的文件:wgangp
链接: https://pan.baidu.com/s/1geiL5wWudYI44sCMR1WhKQ?pwd=wgan 提取码: wgan

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

Successfully merging this pull request may close these issues.

3 participants