Error

tf.config.list_physical_devices("GPU")No attribute:list_physical_devices

Solution

tf.config.experimental.list_physical_devices("GPU") For tensorflow1.15, you should suffix .experimental after config.