LSQFakeQuantize-PyTorch icon indicating copy to clipboard operation
LSQFakeQuantize-PyTorch copied to clipboard

The code example raises error

Open detectRecog opened this issue 3 years ago • 3 comments
trafficstars

Hello, great work! However, I came across the error 'NameError: name 'LSQObserver' is not defined' when I try this code. Could you please correct it? I can not find any LSQObserver defined in this repo.

detectRecog avatar Dec 18 '21 13:12 detectRecog

Hello, thank you for pointing this. The code example was outdated. I updated it according to current repo state (please do "pull" also)

DeadAt0m avatar Dec 18 '21 14:12 DeadAt0m

@DeadAt0m Thank you very much. I successfully run the demo with init_mode = 'observer'. However, when I switch to init_mode = 'learnable'. A error raises. Do you successfully run with 'learnable' init_mode? I want to find out whether it is my environment problem or not.

torchlsq/quantized/modules/observers.py", line 176, in init assert inspect.isclass(observer), 'awaited Observer class not instance or function wrapper'

detectRecog avatar Dec 20 '21 16:12 detectRecog

Oh I am sorry, I have slightly changed the code, for this example, to allow pass the None to observer argument. Just do pull

DeadAt0m avatar Dec 20 '21 17:12 DeadAt0m