问题
I built up a tensorflow model similar to the GPU Implementation of CIFAR10. I have a basic model that is executed on every GPU while the variables for the network are on the CPU. Everything works fine as long as I don't use sparse tensors as weight matrices in the layers.
My sparse weight matrices are constructed with the function tf.sparse_to_dense() or tf.diag(). When I run it on the CPU everything works fine, but when I run it on the GPU I get the message that there is no GPU implementation of these functions.
Is there an alternative? How do I construct sparse weight matrices that are located on a CPU but trained on a GPU?
来源:https://stackoverflow.com/questions/42397950/tensorflow-gradient-calculation-with-sparse-tensors-on-gpu