TensorFlow tf.svd() function is not a good one, We have found two main problems on it:
We also find it can not be run on gpy. In this tutorial, we will introduce you how to fix this error.
Run tf.svd() on GPU
We use gpu to speed up tensorflow, however, we get this error.
Which means we can not run tensorflow tf.svd() function on gpu.
How to fix this error?
We should run tf.svd() on cpu, not gpu.
We can fix this error by this code.
with tf.device('/cpu:0'): s, u, v = tf.svd(inputs)
This code will make tf.svd() is running on our first cpu.