MUST-GAN icon indicating copy to clipboard operation
MUST-GAN copied to clipboard

Test go wrong with only one GPU?

Open lyx0208 opened this issue 3 years ago • 7 comments

I run the test.sh with 1 GPU, the output is a grey image with no person. But it works with 2 GPUs, is there anyway to run with 1 GPU ?

lyx0208 avatar Jul 26 '21 01:07 lyx0208

Thanks, it is a model-saving error. When we saved the model checkpoint (the 157_net_netG.pth that we provided), we saved the parallel model directly, so the saved model has “module." in the keys.

We have fixed it in the line 67-74 of “models/base_model.py”.

TianxiangMa avatar Jul 28 '21 10:07 TianxiangMa

Still goes wrong after adding these lines of codes fashionMENJackets_Vestsid0000432802_4full jpg___fashionMENJackets_Vestsid0000432802_1front jpg_vis

lyx0208 avatar Aug 04 '21 04:08 lyx0208

Did you use a single GPU for testing? After you modify the "base_model.py", the "--gpu_ids" in "test.sh" must be single.

TianxiangMa avatar Aug 04 '21 07:08 TianxiangMa

Yes, and it still doesn't work

lyx0208 avatar Aug 05 '21 00:08 lyx0208

Did you modify the line 76 in “models/base_model.py”? It should be "new_model_dict" instead of the original ”model_dict“.

TianxiangMa avatar Aug 05 '21 10:08 TianxiangMa

Yes

lyx0208 avatar Aug 06 '21 00:08 lyx0208

This problem is usually caused by the inconsistency in the model structure variable names between the loaded model and the built model. You can print the networks and check it.

TianxiangMa avatar Aug 06 '21 06:08 TianxiangMa