【翻譯】根據TensorFlow團隊,TensorFlow 1.9正式支援樹莓派

原文作者

Pete Warden

圖片

CAVEDU教育團隊

翻譯 宗諭 審閱 吉弘
說明

感謝作者Pete Warden的授權翻譯,特此致謝!

樹莓派商品購買傳送門-連結

When TensorFlow was first launched in 2015, we wanted it to be an “open source machine learning framework for everyone”. To do that, we need to run on as many of the platforms that people are using as possible. We’ve long supported Linux, MacOS, Windows, iOS, and Android, but despite the heroic efforts of many contributors, running TensorFlow on a Raspberry Pi has involved a lot of work. Thanks to a collaboration with the Raspberry Pi Foundation, we’re now happy to say that the latest 1.9 release of TensorFlow can be installed from pre-built binaries using Python’s pip package system! If you’re running Raspbian 9 (stretch), you can install it by running these two commands from a terminal:

當TensorFlow於2015年首次發佈時,我們希望它是一個「給所有人的開源機器學習框架」。爲要達成這一點,我們需要盡可能讓它在更多人們使用的平台上運作,所以,我們長期以來支援了Linux、MacOS、Windows、iOS及Android等作業系統。然而,儘管許多貢獻者已經貢獻卓越,在Raspberry Pi上運行TensorFlow仍有許多工作需要完成。感謝與Raspberry Pi基金會的合作,我們現在很高興能宣佈:最新的TensorFlow 1.9版,可透過Python的pip套件系統來安裝建置好的二元檔了!若您正使用Raspbian 9(Raspbian stretch),只要從終端機輸入下面這兩道指令來安裝它:

 

sudo apt install libatlas-base-dev
pip3 install tensorflow

 

You can then run python3 in a terminal, and use TensorFlow just as you would on any other platform. Here’s a simple hello world example:

接下來,您可在終端機上運作python3,並如同在任何其它平台上一樣使用TensorFlow。下面是一個簡單的hello world範例:

 

# Python
import tensorflow as tf
tf.enable_eager_execution()
hello = tf.constant(‘Hello, TensorFlow!’)
print(hello)

 

If the system outputs the following, then you are ready to begin writing TensorFlow programs:

Hello, TensorFlow!

如果看到以下內容:Hello, TensorFlow!, 那您便可開始編寫TensorFlow的程式。

 

There are more details on installing and troubleshooting TensorFlow on the Raspberry Pi on the TensorFlow website.

更多細節,請參考TensorFlow官網上的內容

 

We’re excited about this because the Raspberry Pi is used by many innovative developers, and is also widely used in education to introduce people to programming, so making TensorFlow easier to install will help open up machine learning to new audiences. We’ve already seen platforms like DonkeyCar use TensorFlow and the Raspberry Pi to create self-driving toy cars, and we can’t wait to discover what new projects will be built now that we’ve reduced the difficulty.

我們對這件事感到很興奮,因為Raspberry Pi早已被許多創新開發者使用著,也被廣泛應用於教育領域來推廣程式教育。所以,讓TensorFlow更容易安裝於Raspberry Pi上,將有助於新朋友認識何謂機器學習。我們已經看到像 DonkeyCar 這樣的平台使用TensorFlow與Raspberry Pi來做出能夠自動駕駛的玩具小車。我們也迫不及待想知道,在使用難度降低之後,會有哪些新專案誕生。

 

Eben Upton, founder of the Raspberry Pi project, says, “It is vital that a modern computing education covers both fundamentals and forward-looking topics. With this in mind, we’re very excited to be working with Google to bring TensorFlow machine learning to the Raspberry Pi platform. We’re looking forward to seeing what fun applications kids (of all ages) create with it,” and we agree!

Raspberry Pi創辦人Eben Upton表示:「現今的電腦程式教育必須涵蓋基礎知識與前瞻性的主題。考慮到這一點,我們非常興奮能與Google合作,將TensorFlow機器學習引入Raspberry Pi平台。我們期待看見所有年齡層的孩子們能運用它來打造各種有趣的應用。」這,我們完全同意!

 

We’re hoping to see a lot more educational material and tutorials emerge that will help more and more people explore the possibilities of machine learning on such a cost-effective and flexible device.

我們深切盼望看見更多教材和教學資源問世,幫助更多人在Raspberry Pi這款高CP值又具備擴充彈性的裝置上探索機器學習的各種可能性。

 

備註:若您想要購買樹莓派,可以前往機器人王國商城,謝謝。

 

相關文章

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *