Xilinx / logicnets

Apache License 2.0
81 stars 26 forks source link

RuntimeError: The quantizer passed does not adhere to the quantization protocol. #47

Closed nachiket closed 4 months ago

nachiket commented 4 months ago

I am trying to simple jsc-s training example and getting the following error. I am running in a manually installed mode.

python3 train.py --arch jsc-s --log-dir ./jsc-s /zfsspare/nachiket/logicnets/examples/jet_substructure/dataset.py:39: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.config = yaml.load(f) /zfsspare/nachiket/logicnets/examples/jet_substructure/dataset.py:39: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.config = yaml.load(f) /zfsspare/nachiket/logicnets/examples/jet_substructure/dataset.py:39: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.config = yaml.load(f) Traceback (most recent call last): File "train.py", line 317, in model = JetSubstructureNeqModel(model_cfg) File "/zfsspare/nachiket/logicnets/examples/jet_substructure/models.py", line 46, in init input_quant = QuantBrevitasActivation(QuantHardTanh(model_config["input_bitwidth"], max_val=1., narrow_range=False, quant_type=QuantType.INT, scaling_impl_type=ScalingImplType.PARAMETER), pre_transforms=[bn_in, input_bias]) File "/home/nachiket/.local/lib/python3.8/site-packages/brevitas/nn/quant_activation.py", line 96, in init QuantNLAL.init( File "/home/nachiket/.local/lib/python3.8/site-packages/brevitas/nn/quant_layer.py", line 36, in init QuantNonLinearActMixin.init(self, act_impl, passthrough_act, act_quant, **kwargs) File "/home/nachiket/.local/lib/python3.8/site-packages/brevitas/nn/mixin/act.py", line 118, in init QuantProxyMixin.init( File "/home/nachiket/.local/lib/python3.8/site-packages/brevitas/nn/mixin/base.py", line 73, in init raise RuntimeError( RuntimeError: The quantizer passed does not adhere to the quantization protocol.

nachiket commented 4 months ago

Never mind found https://github.com/Xilinx/logicnets/issues/40#issue-1852775046