我最近重新安装了Ubuntu 14.04和Tensorflow / Keras的深度学习依赖:Cuda(7.5),Cudnn(5.1),Tensorflow(0.10)。
我的安装似乎有问题。我能够训练基于文本的CNN(例如https://raw.githubusercontent.com/fchollet/keras/master/examples/imdb_cnn.py)和其他类型的网络,如RNN。
但我无法通过网络学习任何基于图像的CNN(例如https://raw.githubusercontent.com/fchollet/keras/master/examples/cifar10_cnn.py)代码运行,它只是没有学习。
我尝试过Tensorflow和Keras回购中的一些例子。
关于如何解决这个问题的任何想法?
这里是cifar示例的输出。
Using TensorFlow backend.
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
X_train shape: (50000, 32, 32, 3)
50000 train samples
10000 test samples
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:4b:00.0
Total memory: 7.92GiB
Free memory: 7.81GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:572] creating context when one is currently active; existing: 0x435b0f0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 1 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:4c:00.0
Total memory: 7.92GiB
Free memory: 7.76GiB
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:839] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:4b:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:839] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080, pci bus id: 0000:4c:00.0)
Using real-time data augmentation.
Epoch 1/200
50000/50000 [==============================] - 34s - loss: 2.3043 - acc: 0.0987 - val_loss: 2.7718 - val_acc: 0.1006
Epoch 2/200
50000/50000 [==============================] - 19s - loss: 2.3037 - acc: 0.1007 - val_loss: 2.5559 - val_acc: 0.1030
Epoch 3/200
50000/50000 [==============================] - 19s - loss: 2.3036 - acc: 0.1006 - val_loss: 3.4216 - val_acc: 0.1001
Epoch 4/200
50000/50000 [==============================] - 20s - loss: 2.3041 - acc: 0.0969 - val_loss: 2.8629 - val_acc: 0.1001
Epoch 5/200
50000/50000 [==============================] - 19s - loss: 2.3036 - acc: 0.1003 - val_loss: 3.1287 - val_acc: 0.0981
Epoch 6/200
50000/50000 [==============================] - 19s - loss: 2.3037 - acc: 0.0987 - val_loss: 2.8076 - val_acc: 0.1010
Epoch 7/200
50000/50000 [==============================] - 19s - loss: 2.3035 - acc: 0.1007 - val_loss: 2.6237 - val_acc: 0.1003