From cc6d8757540e3644087c3485dca947e1d378ec63 Mon Sep 17 00:00:00 2001 From: ceci3 Date: Tue, 19 May 2020 13:18:53 +0800 Subject: [PATCH] Fix mistake (#4644) * fix init * update * fix mistake --- PaddleCV/gan/network/base_network.py | 2 +- PaddleCV/gan/scripts/infer_cgan.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PaddleCV/gan/network/base_network.py b/PaddleCV/gan/network/base_network.py index f856401e..882f459c 100644 --- a/PaddleCV/gan/network/base_network.py +++ b/PaddleCV/gan/network/base_network.py @@ -370,7 +370,7 @@ def linear(input, def conv_cond_concat(x, y): batch = fluid.layers.shape(x)[0] ones = fluid.layers.fill_constant( - shape=[ones, y.shape[1], x.shape[2], x.shape[3]], + shape=[batch, y.shape[1], x.shape[2], x.shape[3]], dtype="float32", value=1.0) out = fluid.layers.concat([x, ones * y], 1) diff --git a/PaddleCV/gan/scripts/infer_cgan.sh b/PaddleCV/gan/scripts/infer_cgan.sh index 1317c201..22305d3c 100644 --- a/PaddleCV/gan/scripts/infer_cgan.sh +++ b/PaddleCV/gan/scripts/infer_cgan.sh @@ -1 +1 @@ -python infer.py --model_net CGAN --init_model ./output/c_gan/checkpoints/19/ --n_samples 32 --noise_size 100 --output ./infer_result/c_gan/ +python infer.py --model_net CGAN --init_model ./output/cgan/checkpoints/19/ --n_samples 32 --noise_size 100 --output ./infer_result/cgan/ -- GitLab