Skip to content

Instantly share code, notes, and snippets.

@andeplane
Created September 19, 2016 16:32
Show Gist options
  • Save andeplane/15582c994df57ee31d4ea94e273bc041 to your computer and use it in GitHub Desktop.
Save andeplane/15582c994df57ee31d4ea94e273bc041 to your computer and use it in GitHub Desktop.
anderhaf@pinje:/repos/FunWithTensorflow$ time python functionApproximation.py 10 --plot
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX TITAN
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:02:00.0
Total memory: 6.00GiB
Free memory: 5.12GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:572] creating context when one is currently active; existing: 0x2b34660
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 1 with properties:
name: GeForce GTX TITAN
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:03:00.0
Total memory: 6.00GiB
Free memory: 5.92GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0 1
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0: Y Y
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 1: Y Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:838] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN, pci bus id: 0000:02:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:838] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX TITAN, pci bus id: 0000:03:00.0)
Running for: 10 epochs
Epoch #: 1 epoch loss/size: 6.66207 test set loss/size: 3.44686
Epoch #: 2 epoch loss/size: 2.02595 test set loss/size: 1.11422
Epoch #: 3 epoch loss/size: 0.747645 test set loss/size: 0.498462
Epoch #: 4 epoch loss/size: 0.375583 test set loss/size: 0.285896
Epoch #: 5 epoch loss/size: 0.239048 test set loss/size: 0.204942
Epoch #: 6 epoch loss/size: 0.187156 test set loss/size: 0.174609
Epoch #: 7 epoch loss/size: 0.168128 test set loss/size: 0.163866
Epoch #: 8 epoch loss/size: 0.161572 test set loss/size: 0.160295
Epoch #: 9 epoch loss/size: 0.159416 test set loss/size: 0.159102
Epoch #: 10 epoch loss/size: 0.158628 test set loss/size: 0.15856
Plotting function and approximation error.
Traceback (most recent call last):
File "functionApproximation.py", line 263, in <module>
plt.figure(1)
File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 527, in figure
**kwargs)
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 84, in new_figure_manager
return new_figure_manager_given_figure(num, figure)
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 92, in new_figure_manager_given_figure
window = Tk.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1818, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
real 0m21.593s
user 0m18.068s
sys 0m5.206s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment