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

Question about the code of searching second Hytra block. #10

Open
zhy0860 opened this issue Nov 30, 2021 · 2 comments
Open

Question about the code of searching second Hytra block. #10

zhy0860 opened this issue Nov 30, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zhy0860
Copy link

zhy0860 commented Nov 30, 2021

Hi, appreciate it for your time.

I find an issue in the code of Hytra search phase. When searching for the second block, after the first evaluation the chosen best path of the second block will be appended after the best path of the first block, then the training process is conducted in a three block structure.

Detailed codes are as follows:
(val_hook.py)
if self.every_n_epochs(runner, block_inteval):
best_path = results[0][0]
best_path = [int(i) for i in list(best_path)]

        if len(model.best_paths) == model.start_block + 1:
            model.best_paths.pop()
        model.best_paths.append(best_path)

(siamese_supernets_hytra.py )
if self.start_block > 0:
for i, best_path in enumerate(self.best_paths):
img_v1 = self.online_backbone(img_v1,
start_block=i,
forward_op=best_path,
block_op=True)[0]
img_v2 = self.online_backbone(img_v2,
start_block=i,
forward_op=best_path,
block_op=True)[0]

In other word, the searching is not continued afte a frozen best path of previous block, but with two, the best path of the current block chosen by each evaluation stage is also freezed and appended, it means the path of second block will appear twice during searching. I can't understand why doing so.

It will lead to an issue that if the downsampling is used in the freezed best path of the second block. For instance, suppose the spatial resolution has already reached the smallest scale 1/32 in the freezed previous best path of second block, when continuing searcing if the downsampling is occured again in the current path of second block, there will be an error of mismatch in shape. It makes me confused and we did encounter this problem in our implemetation.

I'm sorry if I haven't described the issue clearly. Thanks a lot for your time again and I'm looking forward to your reply.

@changlin31
Copy link
Owner

Thank you for pointing that out. It seems a bug produced by reorganization of the code. The path shouldn't appear twice. I will let you know when I fix it.

@changlin31 changlin31 self-assigned this Nov 30, 2021
@changlin31 changlin31 added the bug Something isn't working label Nov 30, 2021
@zhy0860
Copy link
Author

zhy0860 commented Nov 30, 2021

Appreciate it a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants