Mael-zys / T2M-GPT

(CVPR 2023) Pytorch implementation of “T2M-GPT: Generating Human Motion from Textual Descriptions with Discrete Representations”
https://mael-zys.github.io/T2M-GPT/
Apache License 2.0
595 stars 52 forks source link

The issue on the evaluation of VQVAE #62

Closed LinghaoChan closed 10 months ago

LinghaoChan commented 10 months ago

Dear authors,

I found that the evaluation of VQVAE includes a line of codes (here):

if args.resume_pth : 
    logger.info('loading checkpoint from {}'.format(args.resume_pth))
    ckpt = torch.load(args.resume_pth, map_location='cpu')
    net.load_state_dict(ckpt['net'], strict=True)
net.train()
net.cuda()

why does the evaluation use train() not eval()?

Best

Jiro-zhang commented 10 months ago

We set net.eval() in the test function, so net.train() will not affect the evaluation.

https://github.com/Mael-zys/T2M-GPT/blob/7db71a28b2117abd9fc0dd402b91df72f1bc6ace/utils/eval_trans.py#L22

LinghaoChan commented 10 months ago

Okay. got it! Many thanks!❤️