htdt / hyp_metric

Hyperbolic Vision Transformers: Combining Improvements in Metric Learning | Official repository
https://arxiv.org/abs/2203.10833
MIT License
184 stars 20 forks source link

Assertion error from `train.py` #8

Closed letme-hj closed 1 year ago

letme-hj commented 1 year ago

Hi, thank you for your work and kindly sharing the code!

While I was trying to run your code on InShop dataset, I faced an assertion error from L143 in train.py. https://github.com/htdt/hyp_metric/blob/c89de0490691bacbd7332171c5455651fe49f25e/train.py#L143

I did not deeply go over the code yet, but I looked at the dataset class and found nothing weird. I wonder if you have anything that comes to your mind regarding this error. Below is what y looks like, and it seems like there are some rows that are not equal. The paired values are quite close though.

스크린샷 2023-10-24 오후 1 33 46

Thanks!

htdt commented 1 year ago

Two columns must be equal, we use the same labels for positives. I recommend to validate if the dataset is copied correctly. After that, I recommend to use the original code with parameters from the paper.