modify the 1:1 contrast code
This commit is contained in:
@ -118,7 +118,7 @@ def inference_image(images: list, transform, net, device, bs=16, embedding_size=
|
||||
patches = torch.stack(patches, dim=0)
|
||||
batch_patches.append(patches)
|
||||
|
||||
features = np.zeros((0, embedding_size))
|
||||
features = np.zeros((0, embedding_size), dtype=np.float32)
|
||||
for patches in batch_patches:
|
||||
pred = net(patches)
|
||||
pred[torch.isinf(pred)] = 1.0
|
||||
|
||||
Reference in New Issue
Block a user