Error in UNQ_C6 (Exersice 3)

Hi, when I try to run this function I take this error:

ValueError: Found nonlayer object (<function CausalAttention at 0x7f370c0698c0>) in layers: [LayerNorm, <function CausalAttention at 0x7f370c0698c0>, Dropout]

I’m sure I did all the previous steps correctly, I don’t know why this error occurs
please can someone help me?

The function CausalAttention returns a layer type object. So, you should invoke the function and use the return value in constructing the model.