Skip to content

Generalise and document TF -> TFLite conversion #4

@psyhtest

Description

@psyhtest

@bellycat77 has managed to convert the TF ResNet50 v1.5 model used in MLPerf Inference to TFLite with the following script:

import tensorflow as tf

graph_def_file = "resnet50_v1.pb"
input_arrays = ["input_tensor"]
output_arrays = ["softmax_tensor"]

converter = tf.contrib.lite.TFLiteConverter.from_frozen_graph(
  graph_def_file, input_arrays, output_arrays)
tflite_model = converter.convert()
open("resnet50_v1.tflite", "wb").write(tflite_model)

We should generalise and automate this via a CK script. For example, the input file can come from a dependency on a TF model, whereas the input and output arrays can be specified in the model's metadata.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions