未验证 提交 ea879d73 编写于 作者: L LielinJiang 提交者: GitHub

[cherrypick 2.0-bera] fix bugs (#168)

* add configuration options (#164)

e.g. python tools/main.py --c configs/stylegan_v2_256_ffhq.yaml -o total_iters=1 log_config.visiual_interval=1

* fix vgg19 url (#167)
Co-authored-by: 农夫三拳_'s avatarlyl120117 <278401555@qq.com>
上级 09ab2ba7
......@@ -120,7 +120,7 @@ class PerceptualLoss(nn.Layer):
perceptual_weight=1.0,
style_weight=1.0,
norm_img=True,
pretrained='https://paddlegan.bj.bcebos.com/model/vgg19.pdparams',
pretrained='https://paddlegan.bj.bcebos.com/models/vgg19.pdparams',
criterion='l1'):
super(PerceptualLoss, self).__init__()
# when loss weight less than zero return None
......
......@@ -45,10 +45,10 @@ def parse_args():
default=False,
help='skip validation during training')
# config options
parser.add_argument('opts',
help='See config for all options',
default=None,
nargs=argparse.REMAINDER)
parser.add_argument("-o",
"--opt",
nargs='+',
help="set configuration options")
#for inference
parser.add_argument("--source_path",
......
......@@ -51,6 +51,6 @@ def main(args, cfg):
if __name__ == '__main__':
args = parse_args()
cfg = get_config(args.config_file)
cfg = get_config(args.config_file, args.opt)
main(args, cfg)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册