cvg / glue-factory

Training library for local feature detection and matching
Apache License 2.0
722 stars 90 forks source link

Possible typo? #44

Closed AlbertoJaenal closed 8 months ago

AlbertoJaenal commented 10 months ago

Hi, First of all, thanks and congrats to the researchers and developers for this amazing set of contributions. They are really handy and will impact the community quite positively!! I was looking through the code to have a better understanding and I hit a place that may have a typo. Here both neg0 and neg1 are assigned to the weight matrix using the same dimension (m), which may hold true when the number of elements is the same in both images, but out of that case it may not work. Shouldn't it be weights[:, -1, :n] = neg1 ? Best, Alberto

sarlinpe commented 9 months ago

Good catch, thanks for bringing it up. This does not affect the training since n == m but we'll fix it.