ierhon commited on
Commit
d3f883b
1 Parent(s): 69a271f

Make the model smaller

Browse files

The previous one was too slow

Files changed (1) hide show
  1. chatbot_constructor.py +2 -2
chatbot_constructor.py CHANGED
@@ -78,10 +78,10 @@ def train(message: str = "", regularization: float = 0.0001, dropout: float = 0.
78
  conv3_flatten_layer = Flatten()(conv3_layer)
79
  concat1_layer = Concatenate()([flatten_layer, attn_flatten_layer, conv1_flatten_layer, conv2_flatten_layer, conv3_flatten_layer])
80
  dropout2_layer = Dropout(dropout)(concat1_layer)
81
- dense1_layer = Dense(2048, activation="linear", kernel_regularizer=L1(regularization))(dropout2_layer)
82
  prelu1_layer = PReLU(alpha_constraint=ValueConstraint())(dense1_layer)
83
  dropout3_layer = Dropout(dropout)(prelu1_layer)
84
- dense2_layer = Dense(1024, activation="relu", kernel_regularizer=L1(regularization))(dropout3_layer)
85
  dropout4_layer = Dropout(dropout)(dense2_layer)
86
  dense3_layer = Dense(512, activation="relu", kernel_regularizer=L1(regularization))(dropout4_layer)
87
  dropout5_layer = Dropout(dropout)(dense3_layer)
 
78
  conv3_flatten_layer = Flatten()(conv3_layer)
79
  concat1_layer = Concatenate()([flatten_layer, attn_flatten_layer, conv1_flatten_layer, conv2_flatten_layer, conv3_flatten_layer])
80
  dropout2_layer = Dropout(dropout)(concat1_layer)
81
+ dense1_layer = Dense(1024, activation="linear", kernel_regularizer=L1(regularization))(dropout2_layer)
82
  prelu1_layer = PReLU(alpha_constraint=ValueConstraint())(dense1_layer)
83
  dropout3_layer = Dropout(dropout)(prelu1_layer)
84
+ dense2_layer = Dense(512, activation="relu", kernel_regularizer=L1(regularization))(dropout3_layer)
85
  dropout4_layer = Dropout(dropout)(dense2_layer)
86
  dense3_layer = Dense(512, activation="relu", kernel_regularizer=L1(regularization))(dropout4_layer)
87
  dropout5_layer = Dropout(dropout)(dense3_layer)