Skip to content

Commit 15ec9c2

Browse files
Update phishing_email_detection_gpt2.py
Forgot to add dropout.
1 parent b790e64 commit 15ec9c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

phishing_email_detection_gpt2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,11 @@ def build_cerebros_base_model(max_seq_length=96, embedding_dim=256, output_dim=V
213213

214214
# Flatten for downstream models
215215
flattened = Flatten()(embedded)
216-
model = Model(inputs=input_layer, outputs=flattened)
216+
dropout = tf.keras.layers.Dropout(.6)(flattened)
217+
model = Model(inputs=input_layer, outputs=dropout)
217218
return model
218219

220+
219221
# Example usage (outputs depend on parameters, set embedding_dim as desired)
220222
cerebros_base_model = build_cerebros_base_model(max_seq_length=96)
221223

0 commit comments

Comments
 (0)