-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
Hello, thanks for releasing the model!
I am observing different outputs on the same input (only between the first run and the second one, the subsequent ones agree with the second oe). The following code reproduces the problem.
import torch
print(f"Torch version: {torch.__version__}")
model = torch.jit.load("model.pt").cuda().eval()
torch.manual_seed(0)
x = torch.randn((1, 3, 224, 224), dtype=torch.float32).to("cuda")
with torch.no_grad():
image_features_1 = model.encode_image(x).float()
image_features_2 = model.encode_image(x).float()
image_features_3 = model.encode_image(x).float()
print(torch.max(torch.abs(image_features_1 - image_features_2)))
print(torch.max(torch.abs(image_features_3 - image_features_2)))
The output:
Torch version: 1.7.1
tensor(0.0039, device='cuda:0')
tensor(0., device='cuda:0')
We btw checked the model buffers and parameters and they do not change in-between the calls.
diskontinuum, brunodoamaral, anthony-wang, Bhaallord, dazeandconfusion and 1 more
Metadata
Metadata
Assignees
Labels
No labels