如何在kaggle上正确更新tensorflow?

问题描述 投票:0回答:1

我想将tf更新到2.7.0,通过命令更新tf后:

enter image description here

检查是否升级成功: enter image description here

结果是没有找到可用的 GPU: enter image description here

这是为什么呢? 以及如何正确升级tensorflow的版本?

tensorflow kaggle
1个回答
0
投票

首先,通过

更新Kaggle内核中的Tensorflow版本
!pip install -U tensorflow==2.3.1

然后,更新GPU集群中的GPU版本:

print("update GPU server TensorFlow version...")

!pip install cloud-gpu-client

import tensorflow as tf 

from cloud_gpu_client import Client

print(tf.__version__)

Client().configure_tpu_version(tf.__version__, restart_type='ifNeeded')

按CTL+SHIFT+P并选择重新启动内核

Kaggle 本身有指南解释这些库在其内核上的用法。

但是,现在认为这已经足够了。

© www.soinside.com 2019 - 2024. All rights reserved.