Update README.md
Browse files
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
|
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())
|
|
|
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())
|