- Hands-On Neural Networks
- Leonardo De Marchi Laura Mitchell
- 61字
- 2021-06-24 14:00:16
Keras implementation
In Keras, it's possible to specify the activations through either an activation layer or through the activation argument supported by all forward layers:
from keras.layers import Activation, Dense
model.add(Dense(32))
model.add(Activation('tanh'))
This is equivalent to the following command:
model.add(Dense(32, activation='tanh'))
You can also pass an element-wise TensorFlow/Theano/CNTK function as an activation:
from keras import backend as K
model.add(Dense(32, activation=K.tanh))
推薦閱讀
- 人工智能超越人類
- AutoCAD快速入門與工程制圖
- PostgreSQL 11 Server Side Programming Quick Start Guide
- Hadoop 2.x Administration Cookbook
- 群體智能與數據挖掘
- Windows程序設計與架構
- Multimedia Programming with Pure Data
- Arduino &樂高創意機器人制作教程
- Nginx高性能Web服務器詳解
- Excel 2007技巧大全
- Mastering ServiceNow Scripting
- 分析力!專業Excel的制作與分析實用法則
- 中國戰略性新興產業研究與發展·增材制造
- Mastering Exploratory Analysis with pandas
- 筆記本電腦維修之電路分析基礎