TensorFlow 2.4 Mac 优化版:性能大幅提升,可在最新的M1芯片上运行

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通过 TensorFlow 2 在各种不同的平台、设备和硬件上提供一流的训练性能,使开发人员、工程师和研究人员能够在他们喜欢的平台上工作。TensorFlow 用户现在可以在搭载 Intel CPU 的 Mac 或搭载 Apple 新芯片 M1 的 Mac 上使用 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/apple\/tensorflow_macos","title":"","type":null},"content":[{"type":"text","text":"TensorFlow 2.4 Mac 优化版"}]},{"type":"text","text":" 和新的 ML Compute(机器学习计算)框架进行加速训练。这些改进,加上 Apple 开发人员可以通过 "},{"type":"link","attrs":{"href":"https:\/\/www.tensorflow.org\/lite","title":"","type":null},"content":[{"type":"text","text":"TensorFlow Lite"}]},{"type":"text","text":" 在 iOS 上执行 TensorFlow,继续展示了 TensorFlow 在 Apple 硬件上支持高性能机器学习执行的广度和深度。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"使用 ML Compute 在 Mac 上的性能"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Mac 一直是开发人员、工程师和研究人员所喜爱的平台。随着 Apple 上周"},{"type":"link","attrs":{"href":"https:\/\/www.apple.com\/apple-events\/november-2020\/?useASL=true","title":"","type":null},"content":[{"type":"text","text":"宣布"}]},{"type":"text","text":" 推出一系列采用新芯片 "},{"type":"link","attrs":{"href":"https:\/\/www.apple.com\/mac\/m1\/","title":"","type":null},"content":[{"type":"text","text":"M1"}]},{"type":"text","text":" 的 Mac 计算机,TensorFlow 2.4 Mac 优化版充分利用了 Mac 的全部能力,在性能上有了巨大的飞跃。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"ML Compute 是 Apple 推出的新框架,它支持在 Mac 上进行 TensorFlow 模型的训练,现在你可以在搭载 M1 或 Intel CPU的 Mac 计算机上利用加速的 CPU 和 GPU 进行训练。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"例如,M1 芯片包含了一个强大的新 8 核 CPU 和多达 8 核的 GPU,这些都是针对 Mac 计算机上的机器学习训练任务而优化的。在下面的图表中,你可以看到 TensorFlow 2.4 Mac 优化版在流行的搭载 M1 和 Intel CPU 的 Mac 上如何实现巨大的性能提升的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" "}]},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/02\/47\/022ae1800b9ca1bbcda0706af7168747.jpg","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在搭载 M1 和 Intel CPU 的 13 英寸 MacBook Pro 上,使用 ML Compute 的常见机型的训练效果以秒为单位显示,数字越小表明训练时间越短。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/87\/f9\/87020a0b62af0d12a2d520a7368c35f9.jpg","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在搭载 Intel CPU 的 MacPro 2019 款上使用 ML Compute 对常见机型的训练效果以秒为单位显示,数字越小表明训练时间越短。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"TensorFlow Apple Mac 优化版入门"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用户无需对现有的 TensorFlow 脚本进行任何更改,就可以使用 ML Compute 作为 TensorFlow 和 TensorFlow 插件的后端。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"首先,请访问 Apple 的 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/apple\/tensorflow_macos","title":"","type":null},"content":[{"type":"text","text":"GitHub 仓库"}]},{"type":"text","text":",了解如何下载并安装 TensorFlow 2.4 Apple Mac 优化版分叉(fork)的说明。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在不久的将来,Apple 将通过分叉版本集成到 "},{"type":"link","attrs":{"href":"https:\/\/github.com\/tensorflow\/tensorflow#community-supported-builds","title":"","type":null},"content":[{"type":"text","text":"TensorFlow 主分支"}]},{"type":"text","text":" 中,使这样的更新更容易让用户获得这些性能数据。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你可以在 "},{"type":"link","attrs":{"href":"https:\/\/machinelearning.apple.com\/updates\/ml-compute-training-on-mac","title":"","type":null},"content":[{"type":"text","text":"Apple 的机器学习网站"}]},{"type":"text","text":"上了解更多关于 ML Compute 框架的信息。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"原文链接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https:\/\/blog.tensorflow.org\/2020\/11\/accelerating-tensorflow-performance-on-mac.html"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章