Skip to content

Commit

Permalink
[res/TensorFlowPythonExamples] Add one_hot operation case (Samsung#739)
Browse files Browse the repository at this point in the history
* This Commit will add `one_hot` operation related case.
For [res/TensorFlowPythonExamples].

Signed-off-by: struss <[email protected]>

* Fix Typo on Python Example File.

* Update depth, on_value, off_value as scalar type.

Signed-off-by: struss <[email protected]>
  • Loading branch information
struss authored May 13, 2020
1 parent 51c850a commit f3dbad8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions res/TensorFlowPythonExamples/examples/one_hot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import tensorflow as tf

indice_ = tf.compat.v1.placeholder(tf.int32, shape=(1, 2, 3, 4), name='Hole')
depth_ = tf.compat.v1.placeholder(tf.int32, shape=(), name='Hole')
on_value_ = tf.compat.v1.placeholder(tf.int32, shape=(), name='Hole')
off_value_ = tf.compat.v1.placeholder(tf.int32, shape=(), name='Hole')
op_ = tf.one_hot(
indices=indice_, depth=depth_, on_value=on_value_, off_value=off_value_, axis=-1)

0 comments on commit f3dbad8

Please sign in to comment.