We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e64880a commit 23b274bCopy full SHA for 23b274b
tensorflow_model_optimization/python/core/common/keras/compression/internal/optimize.py
@@ -212,7 +212,9 @@ def build(self, input_shape):
212
*training_tensors)
213
weights = []
214
for t in compressed_tensors:
215
- weight = self.add_weight(name='TODO', shape=t.shape)
+ weight = self.add_weight(
216
+ name='TODO', dtype=t.dtype, shape=t.shape,
217
+ initializer=tf.keras.initializers.Constant(t))
218
weights.append(weight)
219
220
self.compressed_weights[attr_name] = weights
0 commit comments