谷歌开源计算框架JAX:比Numpy快30倍,还可在TPU上运行!

??新智元报道??
??新智元报道??
来源:外媒
编辑:keyu
【新智元导读】大家有了解过JAX吗?JAX是一种可在CPU、GPU和TPU上运行的“Numpy”,专门针对机器学习研究,并提供高性能自微分计算能力,速度要比纯用Numpy快几十倍!
import numpy as np # 使用标准numpy,运算将在CPU上执行。
x = np.random.random([5000, 5000]).astype(np.float32)
%timeit np.matmul(x, x)
import jax.numpy as np # 使用"JAX版"的numpy from jax import random # 注意JAX下随机数API有所不同 x = random.uniform(random.PRNGKey(0), [5000, 5000]) %timeit np.matmul(x, x)

快速入门链接:https://jax.readthedocs.io/en/latest/notebooks/quickstart.html
Github项目地址:https://github.com/google/jax

https://roberttlange.github.io/posts/2021/02/cma-es-jax/
https://roberttlange.github.io/posts/2020/03/blog-post-10/
https://jax.readthedocs.io/en/latest/notebooks/quickstart.html
https://www.zhihu.com/question/306496943/answer/1041519580
推荐阅读:


关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
关注网络尖刀微信公众号随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 习近平将发表二〇二六年新年贺词 7904141
- 2 2026年国补政策来了 7808738
- 3 东部战区:开火!开火!全部命中! 7712893
- 4 2026年这些民生政策将惠及百姓 7616985
- 5 小学食堂米线过期2.5小时被罚5万 7519709
- 6 解放军喊话驱离台军 原声曝光 7428214
- 7 为博流量直播踩烈士陵墓?绝不姑息 7327605
- 8 每月最高800元!多地发放养老消费券 7238391
- 9 数字人民币升级 1月1日起将计付利息 7141831
- 10 2026年1月1日起 一批新规将施行 7040675








新智元
