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

Problem training with custom dataset #1

Closed
mahdi-darvish opened this issue Jul 24, 2021 · 3 comments
Closed

Problem training with custom dataset #1

mahdi-darvish opened this issue Jul 24, 2021 · 3 comments

Comments

@mahdi-darvish
Copy link

I'm trying to train the model with a custom 64x64 sized image dataset, using the default params:
! python Styleformer/train.py --outdir=./training-runs --data=./resized --gpus=1 --num_layers=1,3,3
but I face this error :
assert len(self.block_resolutions) == len(self.num_block) AssertionError
I've printed the both values, but even the dimensions are different:
block_resolutions = [8, 16, 32, 64]
num_block = [1, 3, 3]

Thank you in advance,

@Jeeseung-Park
Copy link
Owner

Thanks for the question!

As in the paper num_layers(i.e., "Layers") means the number of the encoder for each resolution. Since the image resolution is 64x64 and the model starts with a learned 8x8 constant, four num_layer is needed.

For example, --num_layers=1,2,2,2 will fix the problem. This means one encoder block at 8x8, two at 16x16, two at 32x32, and two at 64x64.

@mahdi-darvish
Copy link
Author

Awesome! It worked; thanks for your timely response.

@xhlho
Copy link

xhlho commented Dec 19, 2023

Hello, thank you for your work. I would like to ask if there are any requirements for the type of dataset used in this model if using one's own dataset? For example, can it be used on items such as tea cups and keys.
thanks.

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

3 participants