Hi,
I reformatted your post to make it readable.
For your future posts, you can use triple backticks before and after your code to do it:
```
# Your code
```

This is really hard to say but it looks like some error occurs and is raises whenever you try to use your logits.
Could you try reducing the size of your code to isolate which part creates the error please?
By removing the data loading and just using random data for example.
Or removing part of your model.
Thanks