Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit caac667

Browse files
authored
Update 20201221-tfmot-compression-api.md
Change index->tensor input argument for update_training_weight method.
1 parent a381910 commit caac667

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rfcs/20201221-tfmot-compression-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,16 @@ class WeightCompressor(metaclass=abc.ABCMeta):
229229
tf.Tensor to set the compressible weight to.
230230
"""
231231

232-
def update_training_weight(self, index: integer, tensor: tf.Tensor):
233-
"""Update a training weight on an index to a given tensor value.
232+
def update_training_weight(self, training_weight: tf.Tensor, tensor: tf.Tensor):
233+
"""Update a training weight to a given tensor value.
234234
235235
This method is for the case that training weight should update to specific
236236
value not from the model optimizer. It'll throws an error if it can't
237237
find the training weight.
238238
239239
Args:
240-
index: integer indicates index of training weight to update.
241-
tensor: tf.Tensor to update specific training weight.
240+
training_weight: tf.Tensor representing a training weight.
241+
tensor: tf.Tensor representing a value to be assigned to the training weight.
242242
"""
243243

244244
@abc.abstractmethod

0 commit comments

Comments
 (0)