Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Distribution of OpenVINO™ Toolkit
- How to do simple operations on the input ? (add, or multiply with a constant tensor) [Tensorflow]

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

idata

Community Manager

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-12-2018
09:41 PM

401 Views

How to do simple operations on the input ? (add, or multiply with a constant tensor) [Tensorflow]

Hi,

I would like to know if it is possible to do "simple" operations like adding or multiplying with a constant tensor ?

I tried this model :

```
tf.reset_default_graph()
X = tf.placeholder(dtype=tf.float32, shape=(1,2,2,1), name = "in037") # note: I also tried to declare this one as a variable
Y = tf.Variable([ [ [ [1],[1] ], [ [1], [1] ] ] ], name='testvar', dtype=tf.float32)
Z = tf.math.add(Y, X, name="out037")
init_op = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init_op)
saver = tf.train.Saver(tf.global_variables())
saver.save(sess, './test/test')
```

I may be doing something wrong, but I get errors, like if the compiler did not like the second variable declared. (I also checked with "--new-parser" by curiosity, but it break the assertion that a node can't have more than one producer (that feels actually weird, but I guess it's still a work in progress anyway) )

If it's not possible, where can I find a precise list of all the constraints and supported operations, etc ?

Thank you in advance !

Link Copied

0 Replies

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.