Created
August 26, 2017 10:45
-
-
Save currypurin/765c2a67b90d448147bc153cd7bf3f82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import tensorflow as tf | |
x_vals = np.array([1., 3., 5., 7., 9.]) | |
# Create the TensorFlow Placceholder | |
x_data = tf.placeholder(tf.float32) | |
# Constant for multilication | |
m = tf.constant(3.) | |
prod = tf.multiply(x_data, m) | |
for x_val in x_vals: | |
print(sess.run(prod, feed_dict={x_data: x_val})) | |
>3.0 | |
>9.0 | |
>15.0 | |
>21.0 | |
>27.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment