前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在Google Colab上学习Tensorflow

在Google Colab上学习Tensorflow

作者头像
Spaceack
发布2020-11-04 14:26:22
8230
发布2020-11-04 14:26:22
举报

挂载Google云端硬盘

from google.colab import drive
import os
drive.mount('/content/drive')
data_dir = 'drive/My Drive/dataset-resized'
output_dir = 'drive/My Drive/out_put'
logs = 'drive/My Drive/logs'
os.listdir(data_dir)

Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(“/content/drive”, force_remount=True).

查看被分配的GPU:

! nvidia-smi

Tue May 19 00:23:20 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82       Driver Version: 418.67       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla P4            Off  | 00000000:00:04.0 Off |                    0 |
| N/A   40C    P8     7W /  75W |      0MiB /  7611MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-04-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 挂载Google云端硬盘
  • 查看被分配的GPU:
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档