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

Is it only suitable for VCNN network? Does the residual network fit? #25

Closed
qq272574497 opened this issue Oct 1, 2022 · 11 comments
Closed

Comments

@qq272574497
Copy link

No description provided.

@MingLin-home
Copy link
Collaborator

It works with residual network. However, only VCNN comes with strong theoretical guarantee. That is, you can apply Zen-score to any network, even non VCNN ones. You loose theoretical guarantee so be careful to verify the results.

@qq272574497
Copy link
Author

It works with residual network. However, only VCNN comes with strong theoretical guarantee. That is, you can apply Zen-score to any network, even non VCNN ones. You loose theoretical guarantee so be careful to verify the results.

What are the steps to run my own network structure in your code? For example:

simpleNet(
(layer1): Sequential(
(0): Conv2d(3, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(3): ReLU()
)
(layer2): Sequential(
(0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(3): ReLU()
)
(layer3): Sequential(
(0): Conv2d(32, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
(3): ReLU()
)
(dropout): Dropout(p=0.5, inplace=False)
(fc): Linear(in_features=1024, out_features=10, bias=True)
(out): Linear(in_features=10, out_features=10, bias=True)
)

@MingLin-home
Copy link
Collaborator

Please check

def compute_nas_score(gpu, model, mixup_gamma, resolution, batch_size, repeat, fp16=False):

for computing zen-score for you model.

@MingLin-home
Copy link
Collaborator

MingLin-home commented Oct 12, 2022 via email

@qq272574497
Copy link
Author

Excuse me, I want to run the demo (https://github.com/idstcv/ZenNAS/blob/main/ZeroShotProxy/compute_zen_score.py), could you tell me the following parameters are correct? Take myresnet50 and cifir10 as examples

--batch_size 64 --input_image_size 32 --repeat_times 32 --mixup_gamma 1e-2 --arch myresnet50 --num_classes 10

@MingLin-home
Copy link
Collaborator

--mixup_gamma 1e-2 : I would suggest 1e-4~1e-6, to approximate gradient. 1e-2 might be too large.

@qq272574497
Copy link
Author

It works with residual network. However, only VCNN comes with strong theoretical guarantee. That is, you can apply Zen-score to any network, even non VCNN ones. You loose theoretical guarantee so be careful to verify the results.

in [Zero-Cost Proxies for Lightweight NAS],reslink was deleted in the search stage, and the residual block was used after the optimal architecture was found. Is that the same with you?

@MingLin-home
Copy link
Collaborator

Yes, they are the same.

@qq272574497
Copy link
Author

I find that pooling has a great impact on the result. Is there any way to reduce the impact of pooling on the result of zero-cost to 0? The only use of pooling is to reduce calculations

@MingLin-home
Copy link
Collaborator

You can use conv with stride=2 to replace pooling. The saving on the computational cost is minor, because there are at most 5 such layers.

@qq272574497
Copy link
Author

You can use conv with stride=2 to replace pooling. The saving on the computational cost is minor, because there are at most 5 such layers.

stride=2 does not work;But I agree with you " The saving on the computational cost is minor"

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

2 participants