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

Commit 5f34024

Browse files
authored
Update 20201221-tfmot-compression-api.md
Update example method naming.
1 parent 7c7aba5 commit 5f34024

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rfcs/20201221-tfmot-compression-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Now we'll explain when each method is called and how many that method called for
375375
</p>
376376

377377
```python
378-
training_model = compressor.optimize_training(model)
378+
training_model = compressor.optimize_model(model)
379379
```
380380

381381
`get_compressible_weights` is called when we want to get a list of variables that we will apply compression.
@@ -387,7 +387,7 @@ When we try to compress the pre-trained model, we just call this method for each
387387
</p>
388388

389389
```python
390-
training_model = compressor.optimize_training(model)
390+
training_model = compressor.optimize_model(model)
391391
```
392392

393393
`init_training_weights` is called when we initialize the cloned training model from the pre-trained model. `optimize_training` method basically clones the model to create a training model for compression, wrapping compressible layers by the training wrapper to create training weights. The number of the method calling is (# of compressible weights).
@@ -409,7 +409,7 @@ training_model.fit(x_train, y_train, epochs=2)
409409
</p>
410410

411411
```python
412-
compressed_model = compressor.optimize_inference(training_model)
412+
compressed_model = compressor.compress_model(training_model)
413413
```
414414

415415
`compress_training_weights` is called when we convert the training model to the compressed model. The number of the method calling is (# of compressible weights).

0 commit comments

Comments
 (0)