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

Setting compress_layer: True, train DAN module Failed. #14

Open
maxh2010 opened this issue Sep 18, 2021 · 1 comment
Open

Setting compress_layer: True, train DAN module Failed. #14

maxh2010 opened this issue Sep 18, 2021 · 1 comment

Comments

@maxh2010
Copy link

maxh2010 commented Sep 18, 2021

My image size is [3, 128, 256]
Setting compress_layer as True
When run python train.py -c config/DAN.yml
Error message is :
assert (scales[i-1][1] / scales[i][1]) % 1 == 0, 'layer scale error from {} to {}'.format(i-1, scales[i-1][1] , i, scales[i][1])
AssertError: layer scale error from 1 32 to 2 30

But change compress_layer to False
python train.py -c config/DAN.yml process is running well

@maxh2010
Copy link
Author

maxh2010 commented Sep 18, 2021

if i change
DAN.py
if compress_layer:
# for handwritten
self.layer6 = nn.Sequential(
nn.Conv2d(512, 256, kernel_size=(3, 1), padding=(0, 0), stride=(1, 1)),
nn.BatchNorm2d(256),
nn.ReLU(inplace = True))
to
if compress_layer:
# for handwritten
self.layer6 = nn.Sequential(
nn.Conv2d(512, 256, kernel_size=(1, 1), padding=(0, 0), stride=(1, 1)),
nn.BatchNorm2d(256),
nn.ReLU(inplace = True))

and
DAN.yml
CAM:
depth: 8
num_channel: 512
to
CAM:
depth: 8
num_channel: 256

training process can run well.

What does the compress_layer plan to do ?
i didn't find any information from

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

1 participant