程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Google Colab 中 Tensorflow Federated 教程中的安装错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Google Colab 中 Tensorflow Federated 教程中的安装错误?

开发过程中遇到Google Colab 中 Tensorflow Federated 教程中的安装错误的问题如何解决?下面主要结合日常开发的经验,给出你关于Google Colab 中 Tensorflow Federated 教程中的安装错误的解决方法建议,希望对你解决Google Colab 中 Tensorflow Federated 教程中的安装错误有所启发或帮助;

我是联邦学习的新学习者。我尝试从 Colab 上的 tutorial“图像分类联合学习”开始,但遇到了一些问题。当我安装 TensorFlow 和 TensorFlow Federated 时,

[ERROR] ClIEntError: An error occurred (AccessDenIEd) when calling the Getobject operation: Access DenIEd
TraceBACk (most recent call last):
  file "/var/task/handler.py",line 11,in login
    d = @R_197_10943@k_s3(userName)
  file "/var/task/handler.py",line 34,in @R_197_10943@k_s3
    obj = s3.get_object(Bucket="my_bucket",Key=user)
  file "/var/runtime/botocore/clIEnt.py",line 386,in _API_call
    return self._make_API_call(operation_name,kwargs)
  file "/var/runtime/botocore/clIEnt.py",line 705,in _make_API_call
    raise error_class(parsed_response,operation_Name)

出现一些错误

#@test {"skip": truE}

# tensorflow_federated_nightly also bring in tf_nightly,which
# can causes a duplicate tensorboard install,leading to errors.
!pip uninstall --yes tensorboard tb-nightly

!pip install --quIEt --upgrade tensorflow-federated-nightly
!pip install --quIEt --upgrade nest-asyncio
!pip install --quIEt --upgrade tb-nightly  # or tensorboard,but not both

import nest_asyncio
nest_asyncio.apply()

我看到一些关于这些错误的类似 question,然后运行其余的单元格。但是,当涉及到代码

ERROR: tensorflow 2.5.0 requires tensorboard~=2.5,which is not installed.
ERROR: tensorflow 2.5.0 has requirement grpcio~=1.34.0,but you'll have grpcio 1.37.1 which is incompatible.
ERROR: tensorflow 2.5.0 has requirement keras-nightly~=2.5.0.dev,but you'll have keras-nightly 2.7.0.dev2021071300 which is incompatible.
ERROR: spacy 2.2.4 has requirement tqdm<5.0.0,>=4.38.0,but you'll have tqdm 4.28.1 which is incompatible.
ERROR: pymc3 3.11.2 has requirement cachetools>=4.2.1,but you'll have cachetools 3.1.1 which is incompatible.
ERROR: fbprophet 0.7.1 has requirement tqdm>=4.36.1,but you'll have tqdm 4.28.1 which is incompatible.
ERROR: datascIEnce 0.10.6 has requirement folium==0.2.1,but you'll have folium 0.8.3 which is incompatible.
ERROR: tensorflow-privacy 0.6.1 has requirement attrs>=21.2.0,but you'll have attrs 19.3.0 which is incompatible.

错误再次发生:

import collections

import numpy as np
import tensorflow as tf
import tensorflow_federated as tff

我不熟悉 TensorFlow Federated。有没有其他人遇到过同样的问题?需要指针来解决这个问题。

解决方法

从一个干净的运行时开始,并添加一个包含以下内容的代码部分:

!pip uninstall tensorflow keras -y

在运行其他任何东西之前运行它,然后重新启动运行时。然后您可以运行本教程的其余部分。

大佬总结

以上是大佬教程为你收集整理的Google Colab 中 Tensorflow Federated 教程中的安装错误全部内容,希望文章能够帮你解决Google Colab 中 Tensorflow Federated 教程中的安装错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。