Here's the code:
# import libraries
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Flatten
from keras.layers import Dense
# import dataset
from keras.preprocessing.image import ImageDataGenerator
train_datagen = ImageDataGenerator()
test_datagen = ImageDataGenerator()
training_set = train_datagen.flow_from_directory(
'data/spectrogramme/ensemble_de_formation',
target_size = (64, 64),
batch_size = 128,
class_mode = 'binary')
test_set = test_datagen.flow_from_directory('data/spectrogramme/ensemble_de_test',
target_size = (64, 64),
batch_size = 128,
class_mode = 'binary')
# initializing
reseau = Sequential()
# 1. convolution
reseau.add(Conv2D(32, (3, 3), input_shape = (64, 64, 3), activation = 'relu'))
reseau.add(MaxPooling2D(pool_size = (2, 2)))
reseau.add(Conv2D(32, (3, 3), activation = 'relu'))
reseau.add(MaxPooling2D(pool_size = (2, 2)))
reseau.add(Conv2D(64, (3, 3), activation = 'relu'))
reseau.add(MaxPooling2D(pool_size = (2, 2)))
reseau.add(Conv2D(64, (3, 3), activation = 'relu'))
reseau.add(MaxPooling2D(pool_size = (2, 2)))
# 2. flatenning
reseau.add(Flatten())
# 3. fully connected
from keras.layers import Dropout
reseau.add(Dense(units = 64, activation = 'relu'))
reseau.add(Dropout(0.1))
reseau.add(Dense(units = 128, activation = 'relu'))
reseau.add(Dropout(0.05))
reseau.add(Dense(units = 256, activation = 'relu'))
reseau.add(Dropout(0.03))
reseau.add(Dense(units = 1, activation = 'sigmoid'))
# 4. compile
reseau.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])
# 5. fit
reseau.fit_generator(training_set, steps_per_epoch = 8000, epochs = 1,
validation_data = test_set, validation_steps = 2000)
This should prove that I have tensorflow GPU with CUDA and CUDNN installed pic
I don't know what to do, I have reinstalled CUDA and CUDNN multiple times
HOWEVER, if I uninstall tensorflow-gpu, the program runs flawlessly... with the exception of needing 5000 seconds per epoch... I'd like to avoid that
FYI, this is all happening on Windows
Any help is appreciated.