mct_quantizers icon indicating copy to clipboard operation
mct_quantizers copied to clipboard

TF 2.16 support

Open Chizkiyahu opened this issue 3 months ago • 0 comments

In TF 2.16 the add_weight function is change https://github.com/sony/mct_quantizers/blob/4bbc18e843ff04d1f46a2a16d5bace32b7b1b37c/mct_quantizers/keras/quantize_wrapper.py#L310
logs

self.optimizer_step = self.add_weight(
                         ^^^^^^^^^^^^^^^^
ValueError: Cannot convert '('o', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'r', '_', 's', 't', 'e', 'p')' to a shape. Found invalid entry 'o' of type '<class 'str'>'. 

debug code

import inspect
signature = inspect.signature(self.add_weight)
print(signature)
(shape=None, initializer=None, dtype=None, trainable=True, regularizer=None, constraint=None, name=None)

Chizkiyahu avatar Mar 12 '24 09:03 Chizkiyahu