Update train.py: avoids error on 'unique_bodyparts' by Zelin2001 · Pull Request #2668 · DeepLabCut/DeepLabCut

@Zelin2001

@Zelin2001

@jeylau

Thanks @Zelin2001, I find your solution very elegant.
I suppose it could be further simplified to:

if name == 'unique_bodyparts':
     keypoints[-1] = max(0, keypoints[-1])

but that's really a detail.
Thanks a lot for the PR 😊

jeylau