1.The shape of the mask [32, 8732] at index 0 does not match the shape of the indexed tensor [279424, 1] at index 0
张量大小不匹配,解决办法:
在multibox_loss.py的
98 loss_c[pos] = 0 # filter out pos boxes for now
上一行加上
loss_c = loss_c.view(pos.size()[0], pos.size()[1])
2.IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number