UnboundLocalError: cannot access local variable 'batch_idx' where it is not associated with a value
In order to circumvent this issue, I've added assertions that check to ensure there is indeed training data, and otherwise alert the user. Hopefully this should generate error information that's more informative.
Presently, when there are no triplets, the loop
is never entered and so batch_idx is unbound here
returning this error:
In order to circumvent this issue, I've added assertions that check to ensure there is indeed training data, and otherwise alert the user. Hopefully this should generate error information that's more informative.