facebookresearch / dinov2

PyTorch code and models for the DINOv2 self-supervised learning method.
Apache License 2.0
9.18k stars 818 forks source link

Same input, same model, different feature output (PyTorch 2.0) #115

Closed chenshihfang closed 1 year ago

chenshihfang commented 1 year ago

Hi, I refer to the inference code from here.

But I found that, given the same input, it produces different output.

image

Does anyone know why this happens?

I use the manual seed already, and it still happens. Inference under PyTorch 2.0

Versions of relevant libraries: [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.22.4 [pip3] torch==2.0.0+cu117 [pip3] torchaudio==2.0.2+cu118 [pip3] torchdata==0.6.1 [pip3] torchmetrics==0.10.3 [pip3] torchsummary==1.5.1 [pip3] torchtext==0.15.2 [pip3] torchvision==0.15.0+cu117 [pip3] triton==2.0.0 [conda] Could not collect

fepegar commented 1 year ago

@sfchen94 Did you figure out why this was happening?

benam2 commented 8 months ago

@sfchen94 could you please share how did you fix your issue?