将cpu变GPU
!pip uninstall protobuf
!pip uninstall tensorflow
!pip install tensorflow-gpu==1.3.0
!pip install --upgrade --force-reinstall tensorflow-gpu
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
效果图如下: