- python环境版本3.9
- 使用如下命令安装tensorflow-federated,当前版本为0.22.0
pip install --upgrade tensorflow-federated
- 默认会安装tensorflow=2.8.0
- 测试是否安装成功
import collections
import numpy as np
import tensorflow as tf
import tensorflow_federated as tff
np.random.seed(0)
tff.federated_computation(lambda: 'Hello, World!')()
输出结果为:
b'Hello, World!'
常用命令:
conda create -n env-name python=3.9
pip install --upgrade tensorflow-federated
pip install ipykernel #使用jupyter notebook时安装
python -m ipykernel install --user --name env-name #部署核到jupyter notebook
参考文献
[1]Tensorflow Federated
[2] github-federated/RELEASE.md
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)