Which line of code throws this error?
Could you post the definition of this layer once you’ve found it and if possible the input shapes?
If you can’t locate the source of this error, could you instead post a code snippet to reproduce this issue, so that we can have a look?
PS: I’ve formatted your code for better readability. You can add code snippets by wrapping them in three backticks ```