Tensorflow2.x: TensorFlow Addons介紹
阿新 • • 發佈:2021-01-29
技術標籤:Tensorflow2.x
1. Addons
在TensorFlow2.x版本引入了 Special Interest Group (SIG),特殊興趣小組,主要實現新發布論文中的演算法。
目前 SIG Addons包已經有這幾個模組:
tfa.activations
tfa.callbacks
tfa.image
tfa.layers
tfa.losses
tfa.metrics
tfa.optimizers
tfa.rnn
tfa.seq2seq
tfa.text
值得注意的是,TensorFlow1.x版本中的tf.contrib裡邊的API大部分遷移到了TF-Addons中。
TensorFlow Addons 中的功能可以分為三類:
建議:完善的 API;鼓勵使用。
不鼓勵:已有更好的選擇。保留 API 是出於歷史原因;或者 API 需要維護,並且處於棄用的等待時間。
棄用:使用風險自負;隨時會刪除。
2. Tenforflow Addons包使用
(1)安裝包:
pip install tensorflow-addons
(2)匯入包:
import tensorflow_addons as tfa
參考: