andreasveit / triplet-network-pytorch

370 stars 95 forks source link

Update train.py #10

Open Anirudh257 opened 5 years ago

Anirudh257 commented 5 years ago

Replaced data[0] with data as it was causing:

IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number