Hi @albanD, thank you for replying.
I didn’t mention that, but I’m using a Temporal Convolutional Network since I’m looking for temporal causality between samples, then I shouldn’t remove some of my inputs.
In the meanwhile apparently I solved  my problem in a similar manner to what you proposed:
I remove those ‘always true’ samples after doing input=model(x) based on target locations, and then I use the formal BCEWithLogitsLoss. I guess the formal implementation is more robust.