Skip to content
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

Test Error #7

Closed
zjxi opened this issue Aug 6, 2019 · 6 comments
Closed

Test Error #7

zjxi opened this issue Aug 6, 2019 · 6 comments

Comments

@zjxi
Copy link

zjxi commented Aug 6, 2019

Hi, thanks for this incredible net. I've already trained the dataset, but when I aim to test it and
I input the following command: python main.py --phrase test --light true
However, I got the error in the log:

##### Information #####
# light :  True
# dataset :  selfie2anime
# batch_size :  1
# iteration per epoch :  1000000

##### Generator #####
# residual blocks :  4

##### Discriminator #####
# discriminator layer :  6

##### Weight #####
# adv_weight :  1
# cycle_weight :  10
# identity_weight :  10
# cam_weight :  1000
 [*] Load FAILURE
 [*] Test finished!
@znxlwm
Copy link
Owner

znxlwm commented Aug 7, 2019

Above error occurred in the following code in my guess:

    def test(self):
        model_list = glob(os.path.join(self.result_dir, self.dataset, 'model', '*.pt'))
        if not len(model_list) == 0:
            model_list.sort()
            iter = int(model_list[-1].split('_')[-1].split('.')[0])
            self.load(os.path.join(self.result_dir, self.dataset, 'model'), iter)
            print(" [*] Load SUCCESS")
        else:
            print(" [*] Load FAILURE")
            return

It works well for me. I'm sorry, I don't know why you got the error...
Debug the above code.

Thank you

@zjxi
Copy link
Author

zjxi commented Aug 7, 2019

Thanks, I wanna know if the model folder under the results directory is empty after training.
And mine was empty.

@Trueyellow
Copy link
Contributor

The state dict of model is saved to the model folder every 100k iterations by default. Make sure you have reached that point.

@youyouhdhd
Copy link

Did you solve it? I also met the same problem.

@zjxi
Copy link
Author

zjxi commented Sep 6, 2019

@youyouhdhd
Not yet.

@YangyangQu
Copy link

You need to put the pretrained model to results/selfie2anime/model/

@zjxi zjxi closed this as completed Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants