I don't know the error message, but it looks as if Keras was installed for CPU and Tensorflow for GPU, so they don't work together.

For the layers, use this command:

Model %>%
layer_dense(units=30,activation='relu',input_shape = c(ncol(X))) %>%
layer_dropout(rate = 0.2) %>%
layer_dense(units = 1, activation = 'sigmoid')

You can copy it from the keras train function on the manual page, and also the subsequent compile command. But I suppose it won't work when the model was not built. If so, deinstall Keras and Tensorflow and install it again. Make sure that both are installed for CPU, not GPU.