Transformers
PyTorch
English
bridgetower
gaudi
Inference Endpoints
anahita-b commited on
Commit
fc651ed
1 Parent(s): 8a0275b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -51,10 +51,10 @@ processor = BridgeTowerProcessor.from_pretrained("BridgeTower/bridgetower-large-
51
  model = BridgeTowerForContrastiveLearning.from_pretrained("BridgeTower/bridgetower-large-itm-mlm-itc")
52
 
53
  inputs  = processor(images, texts, padding=True, return_tensors="pt")
54
- outputs = model(**inputs, labels=torch.ones(2))
55
 
56
  inputs  = processor(images, texts[::-1], padding=True, return_tensors="pt")
57
- outputs_swapped = model(**inputs, labels=torch.ones(2))
58
 
59
  print('Loss', outputs.loss.item())
60
  print('Loss with swapped images', outputs_swapped.loss.item())
 
51
  model = BridgeTowerForContrastiveLearning.from_pretrained("BridgeTower/bridgetower-large-itm-mlm-itc")
52
 
53
  inputs  = processor(images, texts, padding=True, return_tensors="pt")
54
+ outputs = model(**inputs)
55
 
56
  inputs  = processor(images, texts[::-1], padding=True, return_tensors="pt")
57
+ outputs_swapped = model(**inputs)
58
 
59
  print('Loss', outputs.loss.item())
60
  print('Loss with swapped images', outputs_swapped.loss.item())