| # Copyright 2020 The IREE Authors |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| class Squared(tf.Module): |
| concrete_func = model.__call__.get_concrete_function( |
| tf.TensorSpec(shape=[4, 3], dtype=tf.float32)) |
| converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func], |
| tflite_model = converter.convert() |
| this_dir = os.path.dirname(__file__) |
| with open(os.path.join(this_dir, "tflite_sample.fb"), "wb") as f: |