Why Tensorflow Is Slower With Gpu Instead Of Cpu?
This is a really simple neural network: n_pts = 500000 np.random.seed(0) Xa = np.array([np.random.normal(13, 2, n_pts), np.random.normal(12, 2, n_pts)]).T Xb = np.array(
Solution 1:
GPUs work best with massively parallel workloads, your simple model is not able to achieve that. Data needs to be transfered between CPU and GPU, so if this overhead is bigger than the actual computation, then the CPU will most likely be faster, as no transfer overhead happens.
Only a much bigger model would be able to profit from GPU acceleration.
Post a Comment for "Why Tensorflow Is Slower With Gpu Instead Of Cpu?"