### tensorflow==2.3.0

import tensorflow as tf
import numpy as np

# Weight Quantization
converter = tf.lite.TFLiteConverter.from_saved_model('experiment/saved_model/1596242469')
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
tflite_quant_model = converter.convert()
with open('mobilebert_english_weight_quant.tflite', 'wb') as w:
    w.write(tflite_quant_model)
print("Weight Quantization complete! - mobilebert_english_weight_quant.tflite")
86ee75f62d3ec7a22e7d7f4eacad1cab203b93ed
<mask token>

<mask token>
with open('mobilebert_english_weight_quant.tflite', 'wb') as w:
    w.write(tflite_quant_model)
print('Weight Quantization complete! - mobilebert_english_weight_quant.tflite')

<mask token>
converter = tf.lite.TFLiteConverter.from_saved_model(
    'experiment/saved_model/1596242469')
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
tflite_quant_model = converter.convert()
with open('mobilebert_english_weight_quant.tflite', 'wb') as w:
    w.write(tflite_quant_model)
print('Weight Quantization complete! - mobilebert_english_weight_quant.tflite')

import tensorflow as tf
import numpy as np
converter = tf.lite.TFLiteConverter.from_saved_model(
    'experiment/saved_model/1596242469')
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
tflite_quant_model = converter.convert()
with open('mobilebert_english_weight_quant.tflite', 'wb') as w:
    w.write(tflite_quant_model)
print('Weight Quantization complete! - mobilebert_english_weight_quant.tflite')

### tensorflow==2.3.0

import tensorflow as tf
import numpy as np

# Weight Quantization
converter = tf.lite.TFLiteConverter.from_saved_model('experiment/saved_model/1596242469')
converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
tflite_quant_model = converter.convert()
with open('mobilebert_english_weight_quant.tflite', 'wb') as w:
    w.write(tflite_quant_model)
print("Weight Quantization complete! - mobilebert_english_weight_quant.tflite")