huanghoujing / AlignedReID-Re-Production-Pytorch

Reproduce AlignedReID: Surpassing Human-Level Performance in Person Re-Identification, using Pytorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity

Morceguito opened this issue · comments

File "/content/drive/My Drive/MADDoG/models/loss.py", line 75, in hard_example_mining
dist_mat[is_neg].contiguous().view(N, -1), 1, keepdim=True)
RuntimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity

This only works when I have a batchsize of 10, but less than that this error appears.