Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenp committed Dec 5, 2023
1 parent f80e656 commit 53c3711
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tutorials/notebooks/example_keras_imagenet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,13 @@
"source": [
"import tempfile\n",
"_, tflite_file_path = tempfile.mkstemp('.tflite') # Path of exported model\n",
"mct.exporter.keras_export_model(model=quantized_model, \n",
" save_model_path=tflite_file_path,\n",
" serialization_format=mct.exporter.KerasExportSerializationFormat.TFLITE,\n",
" quantization_format=mct.exporter.QuantizationFormat.FAKELY_QUANT)\n",
"mct.exporter.keras_export_model(model=quantized_model, save_model_path=tflite_file_path,\n",
" target_platform_capabilities=target_platform_cap,\n",
" serialization_format=mct.exporter.KerasExportSerializationFormat.TFLITE)\n",
"\n",
"_, keras_file_path = tempfile.mkstemp('.h5') # Path of exported model\n",
"mct.exporter.keras_export_model(model=quantized_model, \n",
" save_model_path=keras_file_path,\n",
"mct.exporter.keras_export_model(model=quantized_model, save_model_path=keras_file_path,\n",
" target_platform_capabilities=target_platform_cap,\n",
" serialization_format=mct.exporter.KerasExportSerializationFormat.KERAS_H5)"
],
"metadata": {
Expand Down

0 comments on commit 53c3711

Please sign in to comment.