Skip to content Skip to sidebar Skip to footer

Time Comparison For Tensorflow Operation And Numpy Multiplication

I've been trying to optimize my computations; and for most operations that I've tried, tensorflow is much faster. I'm trying to do a fairly simple operation...Transform a matrix (

Solution 1:

Your results are compatible with the benchmarks from another guy.

In his benchmark he compared NumPy, Theano and Tensorflow on

an Intel core i5-4460 CPU with 16GiB RAM and a Nvidia GTX 970 with 4 GiB RAM using Theano 0.8.2, Tensorflow 0.11.0, CUDA 8.0 on Linux Mint 18

His results for addition shows that: enter image description here

He also tested a few other functions such as matrix multiplication:

enter image description here

The results are:

It is clear that the main strengths of Theano and TensorFlow are very fast dot products and matrix exponents. The dot product is approximately 8 and 7 times faster respectively with Theano/Tensorflow compared to NumPy for the largest matrices. Strangely, matrix addition is slow with the GPU libraries and NumPy is the fastest in these tests.

The minimum and mean of matrices are slow in Theano and quick in Tensorflow. It is not clear why Theano is as slow (worse than NumPy) for these operations.

Post a Comment for "Time Comparison For Tensorflow Operation And Numpy Multiplication"