Sequence Model final assignment

The following code providing error Wrong values when training=True. Whats the problem.

{mentor edit: code removed - not allowed by the course Honor Code}

self.ffn(…) should use out1, not attn_output.

In self.dropout_ffn(…), it’s safer to use “training=training”, in case there are other positional arguments.

In self.layernorm2(…). use out1 instead of attn_otuput.