Google發布TensorFlow r1.4

文 / TensorFlow 團隊

TensorFlow 1.4 版現在已公開發布 - 這是一個大更新!我們在這裡非常高興地宣布一些令人興奮的新功能,希望大家喜歡。

Keras

在 1.4 版中,Keras 已從 tf.contrib.keras 遷移到核心軟體包 tf.keras 中。Keras是一個非常熱門的機器學習框架,它包含眾多高級 API,這些 API 可以最大程度縮短從您的創意到可行實現之間的時間。Keras 可與其他核心 TensorFlow 功能平穩集成,包括 Estimator API。事實上,您可以調用 tf.keras.estimator.model_to_estimator 函數,直接從任何 Keras 模型構建估算器。由於 Keras 現在已添加到 TensorFlow 核心中,您可以在生產工作流程中依賴它。

Advertisements

數據集

我們高興地宣布,Dataset API 已從 tf.contrib.data 遷移到核心軟體包 tf.data 中。1.4 版的 Dataset API 還增加了對 Python 生成器的支持。我們強烈建議使用 Dataset API 為 TensorFlow 模型創建輸入管道,因為:

  • 與舊 API(feed_dict 或隊列式管道)相比,Dataset API 可以提供更多功能。

  • Dataset API 的性能更高。

  • Dataset API 更簡潔,更易於使用。

未來,我們會將開發重心放到 Dataset API 而不是舊 API 上。

估算器的分散式訓練和評估

1.4 版還引入了實用函數 tf.estimator.train_and_evaluate ,它簡化了訓練、評估和估算器模型的導出工作。此函數可以實現訓練和評估的分散式執行,同時仍然支持本地執行。

Advertisements

其他增強功能

除了這裡介紹的功能外,1.4 版還引入了許多其他增強功能,版本說明中進行了相關介紹:

https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md

安裝 TensorFlow 1.4

TensorFlow 1.4 版現在可以使用標準 pip 安裝獲取。

# Note: the following command will overwrite any existing TensorFlow# installation.$ pip install --ignore-installed --upgrade tensorflow# Use pip for Python 2.7# Use pip3 instead of pip for Python 3.x

我們已將 tensorflow.org 上的文檔更新為 1.4。

TensorFlow 的增強離不開貢獻者。非常感謝參與 TensorFlow 開發的所有人!還猶豫什麼?趕快加入社區並在 GitHub 上開發源代碼或幫助在 Stack Overflow 上回答問題,成為一名貢獻者吧!

我們希望大家喜歡這個版本中的所有功能。

祝大家盡情享受 TensorFlow 編碼!

Advertisements

你可能會喜歡