For more context: each sample is composed by 6 components (3 for Accelerometer, 3 for Gyroscope) and I used that data do define some boundaries in which some new derived data (like mean, standard deviation...) resides. Using these boundaries, I wanted to penalize a prediction if the sample was too far away from the rules values, hopefully increasing accuracy. But I have been getting a lot of errors, and this one I cannot really understand.
If you have any additional tips on the custom loss, I would be happy to hear them since it's my first time working with a custom one.
Thanks in advance!