Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / res / TensorFlowPythonModels / examples / ReluN1To1 / __init__.py
1 import tensorflow as tf
2
3 in1_ = tf.compat.v1.placeholder(tf.float32, shape=(2, 3, 4), name="Hole")
4 in2_ = tf.constant(-1.0, dtype=tf.float32, shape=[], name="Hole")
5 in3_ = tf.math.maximum(x=in1_, y=in2_, name="Hole")
6 in4_ = tf.constant(1.0, dtype=tf.float32, shape=[], name="Hole")
7 out_ = tf.math.minimum(x=in3_, y=in4_, name="Relu1")
8
9 # tf2tfliteV2 will convert .pbtxt model to .tflite with one RELU_N1_TO_1
10 # example)
11 '''
12 python ../../compiler/tf2tfliteV2/tf2tfliteV2.py \
13 --v1 \
14 --input_path ./ReluN1To1.pbtxt \
15 --output_path ./ReluN1To1.tflite \
16 --input_arrays Hole \
17 --output_arrays Relu1
18 '''