Class attributes are not recognized in forward()

Hello. I am trying to run the work of DSQ (paper: https://arxiv.org/pdf/1908.05033.pdf, code: https://github.com/ricky40403/DSQ) and faced a strange issue. I get “torch.nn.modules.module.ModuleAttributeError: ‘DSQConv’ object has no attribute ‘running_lw’”. Inside forward(), almost every attribute from the DSQConv class seems to not be noticed inside forward().

Also, can someone tell me how should I store an encoded version of the models to analyse the storage size difference between different bit ranges?