官术网_书友最值得收藏!

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))
主站蜘蛛池模板: 乐东| 清流县| 湘潭市| 金溪县| 光泽县| 海淀区| 驻马店市| 任丘市| 昔阳县| 阿鲁科尔沁旗| 五台县| 肃南| 吴旗县| 田阳县| 汶上县| 景东| 类乌齐县| 都昌县| 深圳市| 易门县| 平山县| 靖边县| 谷城县| 改则县| 长春市| 盱眙县| 土默特左旗| 会宁县| 万载县| 宁陕县| 广西| 长宁县| 枞阳县| 紫云| 宁阳县| 遵义市| 胶南市| 河曲县| 永泰县| 长宁县| 吴江市|