Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2020-12-10 11:21:34
Verify that the network connection is operating properly and execute the following command:
pip3 install --upgrade tensorflow-gpu
Download the proper GPU version. In this example, the version for Python 3.5 is downloaded. The downloaded file is tf_nightly_gpu-1.head-cp35-cp35m-linux_x86_64.whl.
Execute the following command to install TensorFlow:
pip3 install tf_nightly_gpu-1.head-cp35-cp35m-linux_x86_64.whl
After you install TensorFlow, execute a Python script file that contains the following code to verify the installation:
import tensorflow as tf
import numpy as np
x_data = np.float32(np.random.rand(2, 100))
y_data = np.dot([0.100, 0.200], x_data) + 0.300
b = tf.Variable(tf.zeros([1]))
W = tf.Variable(tf.random_uniform([1, 2], -1.0, 1.0))
y = tf.matmul(W, x_data) + b
loss = tf.reduce_mean(tf.square(y - y_data))
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(loss)
init = tf.initialize_all_variables()
sess = tf.Session()
sess.run(init)
for step in range(0, 201):
sess.run(train)
if step % 20 == 0:
print (step, sess.run(W), sess.run(b))*
If TensorFlow has been installed successfully, the following information is displayed:
Pure Mode