MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / main

Function main

quantization/save_mobilenetv2.py:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26def main():
27 model = tf.keras.applications.MobileNetV2(weights='imagenet')
28 model_save_dir = os.path.dirname(MODEL_SAVE_PATH)
29 if not os.path.isdir(model_save_dir):
30 os.makedirs(model_save_dir)
31 tfjs.converters.save_keras_model(model, MODEL_SAVE_PATH)
32 print('Saved MobileNetV2 in tfjs_layer_model format at %s' % MODEL_SAVE_PATH)
33
34
35if __name__ == '__main__':

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected