Machine Learning

Install Tensorflow-GPU

Recent challenge was getting tensorflow-gpu installed. I found this doc helpful but out of date.

How To Install TensorFlow GPU (With Detailed Steps)

I liked his recommendation to use anaconda. Specific versions I used successfully as of 4/20/2019:

  • Windows 10 Pro 1809
  • GPU Drivers: 425.31-desktop-win10-64bit-international-whql
  • cuda_10.0.130_win10_network
  • cudnn-10.0-windows10-x64-v7.4.2
  • Use python 3.6 (not 3.5): conda create -n tf python=3.6
  • Installs latest tensorflow-gpu which at time of writing was: '1.13.1'

Output: It's learning... running this sample: Deep Convolutional Generative Adversarial Network | TensorFlow Core | TensorFlow

>>> train(train_dataset, EPOCHS)WARNING:tensorflow:From C:\Users\Christopher\.conda\envs\tf\lib\site-packages\tensorflow\python\keras\layers\ calling dropout (from tensorflow.python.ops.nn_ops) withkeep_prob is deprecated and will be removed in a future version.Instructions for updating:Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.WARNING:tensorflow:From C:\Users\Christopher\.conda\envs\tf\lib\site-packages\tensorflow\python\ops\losses\ to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.Instructions for updating:Use tf.cast instead.WARNING:tensorflow:From C:\Users\Christopher\.conda\envs\tf\lib\site-packages\tensorflow\python\ops\ to_int32 (from tensorflow.python.ops.math_ops) is deprecatedand will be removed in a future version.Instructions for updating:Use tf.cast instead.2019-04-19 14:32:39.289959: I tensorflow/stream_executor/] successfully opened CUDA library cublas64_100.dll locallyTime taken for epoch 1 is 43.11444854736328 secTime taken for epoch 2 is 38.384116649627686 secTime taken for epoch 3 is 38.42229914665222 secTime taken for epoch 4 is 39.09036469459534 secTime taken for epoch 5 is 39.71743988990784 secTime taken for epoch 6 is 40.49113416671753 secTime taken for epoch 7 is 41.50963258743286 secTime taken for epoch 8 is 41.584550619125366 secTime taken for epoch 9 is 41.74058818817139 secTime taken for epoch 10 is 41.18927764892578 secTime taken for epoch 11 is 41.077805042266846 secTime taken for epoch 12 is 40.976412296295166 secTime taken for epoch 13 is 41.03920006752014 secTime taken for epoch 14 is 40.70431661605835 sec

Tada. Well that's not great handwriting but my graphics card is pretty crappy. I think this counts as an excuse for a new PC.