diff --git a/PaddleCV/gan/network/base_network.py b/PaddleCV/gan/network/base_network.py index f856401e5594f45b69e4b85054ab27dd8d85cc83..882f459cf9763f16b8f52631b974e5f24c87d8a5 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 1317c2014c3c8fc1d2b1dbe75290c56f657fb230..22305d3c5cc74d8db176f1f3a3eea39e7e29ce94 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/