Hey,
I am training a CNN model to classify images of the DERMNET dataset. My GPU utilization doesn’t go above 20%. Can someone help, please?
I have tried using:
tf.config.experimental.set_virtual_device_configuration(
physical_devices[0],
[tf.config.experimental.VirtualDeviceConfiguration(memory_limit=1024*10)])
And this is the code for my model:
input_shape = (batch_size, image_size, image_size, channels)
n_classes = 23
model = keras.models.Sequential([
resize_rescale,
data_augmentation,
keras.layers.Conv2D(32, (3,3), activation='relu', input_shape = input_shape),
keras.layers.MaxPool2D((2,2)),
keras.layers.Conv2D(64, kernel_size = (3,3), activation='relu'),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Conv2D(64, kernel_size = (3,3), activation='relu'),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Conv2D(64, (3, 3), activation='relu'),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Conv2D(64, (3, 3), activation='relu'),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Conv2D(64, (3, 3), activation='relu'),
keras.layers.MaxPooling2D((2, 2)),
keras.layers.Flatten(),
keras.layers.Dense(64, activation='relu'),
keras.layers.Dense(n_classes, activation='softmax'),
])
model.build(input_shape=input_shape)