mage icon indicating copy to clipboard operation
mage copied to clipboard

Some question about change datasets

Open zhihao-2022 opened this issue 1 year ago • 3 comments

I am sorry to bother you. If I want to change outher dataset, which input size is 32*32 for cifar10 (I can't resize image for some reason ). Except the input size from 256 to 32. and vocab_size from 1000 classes into 10 model_mage.py and what should I need to change?

I am not sure what is usage for self.fake_class_label = self.codebook_size + 1100 - 1024 in line 169 in model_mage.py

I am looking forward to your reply. Thanks

zhihao-2022 avatar Sep 22 '23 13:09 zhihao-2022

Have you solved this?

mabaisen avatar Dec 09 '23 12:12 mabaisen

no, do you guys have a solution about that?


From: mabaisen @.> Sent: Saturday, December 9, 2023 8:21 PM To: LTH14/mage @.> Cc: Zhihao Dou @.>; Author @.> Subject: Re: [LTH14/mage] Some question about change datasets (Issue #42)

Have you solved this?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/LTH14/mage/issues/42*issuecomment-1848394991__;Iw!!OToaGQ!s6QFqhb9j6keLIwBzH_mmPsZbQPo--c8zk85kqSQbS8YfNbPqNYclPHouYRaoNSwo5PiNKJqN6JuHYhD31U-PosC$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/A2GGGYUPZDQ2NC7YB3DUPB3YIRJVZAVCNFSM6AAAAAA5DDUDBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGM4TIOJZGE__;!!OToaGQ!s6QFqhb9j6keLIwBzH_mmPsZbQPo--c8zk85kqSQbS8YfNbPqNYclPHouYRaoNSwo5PiNKJqN6JuHYhD3-VgkNOX$. You are receiving this because you authored the thread.Message ID: @.***>

zhihao-2022 avatar Dec 10 '23 17:12 zhihao-2022

@zhihao-2022 if you want to use 32x32 images as input, you need to change the pre-trained VQGAN, as the provided one is pre-trained on ImageNet 256x256 with patch size 16. You could consider training a VQGAN on ImageNet with stride 2, so the token sequence length of an image is still 16x16, same as ImageNet

LTH14 avatar Dec 10 '23 17:12 LTH14