ierhon commited on
Commit
67f5bd6
1 Parent(s): b60840d

Use only ReLU

Browse files
Files changed (1) hide show
  1. chatbot_constructor.py +2 -2
chatbot_constructor.py CHANGED
@@ -71,11 +71,11 @@ def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.
71
  dense1_layer = Dense(512, activation="linear", kernel_regularizer=L1(regularization))(dropout2_layer)
72
  prelu1_layer = PReLU()(dense1_layer)
73
  dropout3_layer = Dropout(dropout)(prelu1_layer)
74
- dense2_layer = Dense(256, activation="tanh", kernel_regularizer=L1(regularization))(dropout3_layer)
75
  dropout4_layer = Dropout(dropout)(dense2_layer)
76
  dense3_layer = Dense(256, activation="relu", kernel_regularizer=L1(regularization))(dropout4_layer)
77
  dropout5_layer = Dropout(dropout)(dense3_layer)
78
- dense4_layer = Dense(100, activation="tanh", kernel_regularizer=L1(regularization))(dropout5_layer)
79
  concat2_layer = Concatenate()([dense4_layer, prelu1_layer, attn_flatten_layer, conv1_flatten_layer])
80
  dense4_layer = Dense(resps_len, activation=end_activation, kernel_regularizer=L1(regularization))(concat2_layer)
81
  model = Model(inputs=input_layer, outputs=dense4_layer)
 
71
  dense1_layer = Dense(512, activation="linear", kernel_regularizer=L1(regularization))(dropout2_layer)
72
  prelu1_layer = PReLU()(dense1_layer)
73
  dropout3_layer = Dropout(dropout)(prelu1_layer)
74
+ dense2_layer = Dense(256, activation="relu", kernel_regularizer=L1(regularization))(dropout3_layer)
75
  dropout4_layer = Dropout(dropout)(dense2_layer)
76
  dense3_layer = Dense(256, activation="relu", kernel_regularizer=L1(regularization))(dropout4_layer)
77
  dropout5_layer = Dropout(dropout)(dense3_layer)
78
+ dense4_layer = Dense(100, activation="relu", kernel_regularizer=L1(regularization))(dropout5_layer)
79
  concat2_layer = Concatenate()([dense4_layer, prelu1_layer, attn_flatten_layer, conv1_flatten_layer])
80
  dense4_layer = Dense(resps_len, activation=end_activation, kernel_regularizer=L1(regularization))(concat2_layer)
81
  model = Model(inputs=input_layer, outputs=dense4_layer)