Tensorflow federal learning 安装

  1. 首先安装TensorFlow:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ tensorflow==2.2.0
  1. 然后到这个网站(https://github.com/tensorflow/federated/tree/v0.16.1#tensorflow)查询对应的联邦学习版本:
    Tensorflow federal learning 安装_第1张图片
    如图,我要安装0.16.1:
    tensorflow_federated==0.16.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ tensorflow_federated==0.16.1

然后就可以在python文件中导入了:

import tensorflow_federated as tff

你可能感兴趣的:(联邦学习,tensorflow,联邦学习)