!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}
!mkdir -p drive
!google-drive-ocamlfuse drive  -o nonempty
!pip install -q keras
from google.colab import drive
drive.mount('/content/gdrive')
pwd
cd drive/Colab/LSTM_FCN/LSTM_FCN

Colab
 

!python wm1.py
import tensorflow as tf
tf.test.gpu_device_name()
'/device:GPU:0'

 

相关文章:

  • 2022-01-20
  • 2021-12-15
  • 2022-01-19
  • 2022-12-23
  • 2022-01-21
  • 2021-10-08
  • 2021-09-25
  • 2021-07-16
猜你喜欢
  • 2021-09-13
  • 2022-12-23
  • 2021-06-19
  • 2021-11-22
  • 2021-10-16
  • 2022-12-23
  • 2021-07-31
相关资源
相似解决方案