Closed taiyipan closed 1 year ago
Hi there I think the issue may be in getitem function of the QueryDatasetFromStruct class.
In the function h5feat is indexed bye negSample.tolist().
negFeat = h5feat[negSample.tolist()]
negSample.tolist() however is a list of floats.
re-writing this line to: negFeat = h5feat[list(map(int, negSample))]
appears to solve the issue for me.
@oeg1n18 Thanks! I changed that 1 line of code and now it can run training loops finally.
No Problem. That's great!
From: Taiyi Pan @.> Sent: Sunday, May 28, 2023 11:12 PM To: Nanne/pytorch-NetVlad @.> Cc: Oliver Grainge @.>; Mention @.> Subject: Re: [Nanne/pytorch-NetVlad] Running "python main.py --mode=train --arch=vgg16 --pooling=netvlad --num_clusters=64" leads to this error. Help? (Issue #86)
CAUTION: This e-mail originated outside the University of Southampton.
@oeg1n18https://github.com/oeg1n18 Thanks! I changed that 1 line of code and now it can run training loops finally.
— Reply to this email directly, view it on GitHubhttps://github.com/Nanne/pytorch-NetVlad/issues/86#issuecomment-1566282204, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK7O5OWKEN6UMLKWZUJ754LXIPEU3ANCNFSM6AAAAAAYAHMOWU. You are receiving this because you were mentioned.Message ID: @.***>