Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / res / TensorFlowPythonExamples / examples / expand_dims_01 / __init__.py
1 import tensorflow as tf
2
3 # example 2 where input has unknown dim and axis is const
4
5 in_ = tf.compat.v1.placeholder(dtype=tf.int32, shape=(None, None), name="Hole")
6 expand_dim_ = tf.compat.v1.expand_dims(in_, 1, name="ExpandDims")
7
8 # note: the code above will produce tflite file where output shape of ExpandDims is [1, 1, 1]
9 #       (Tflite converter replace "None" to "1")
10 #       axis can be negative integer.