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

Resnet DoReFaNet implementation #1542

Closed
Abhishek2271 opened this issue Sep 23, 2021 · 1 comment
Closed

Resnet DoReFaNet implementation #1542

Abhishek2271 opened this issue Sep 23, 2021 · 1 comment

Comments

@Abhishek2271
Copy link

Abhishek2271 commented Sep 23, 2021

Hi @ppwwyyxx ,

I was looking into implementing DoReFaNet for ResNet and came across a link in the source of tensorpack in "/examples/ResNet/Cifar-10-resnet.py" implementation.

The code at #69 seems to be very old and now removed from the examples as well. I tried to implement it by updating it so that it works for the new code but there were exceptions while creating resnet blocks.

So now, I tried to implement the DoReFaNet in the new code in the tensorpack based on "/examples/ResNet/Cifar-10-resnet.py" but in the old implementation, the activation quantization is done before pooling. Should this not be after pooling (as seen in the screenshot)? (sorry this was my misunderstanding, the layer l is being pooled as opposed to my misunderstanding that c2 was being pooled. The quantization step now makes sense for activation quantization)

image

Also shouldn't the remap variables be used to quantize weights? In the old implementation this was different but I guess this was changed later.

image

@Abhishek2271 Abhishek2271 changed the title Issue with old resnet DoReFaNet implementation Resnet DoReFaNet implementation Sep 23, 2021
@ppwwyyxx
Copy link
Collaborator

Also shouldn't the remap variables be used to quantize weights

Yes it should, and the current DoReFaNet example does that.

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