dmrau commited on
Commit
dca7d5a
·
1 Parent(s): 37417b8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -10,9 +10,11 @@ model = AutoModelForSequenceClassification.from_pretrained('dmrau/bow-bert')
10
  tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
11
 
12
  # tokenize query and passage and concatenate them
13
- inp = tokenizer(['this is a query'], ['this is a passage'], return_tensors='pt')
14
-
15
  # get estimated score
16
  print('score', model(**inp).logits[:, 1])
17
 
 
 
 
18
  ```
 
10
  tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
11
 
12
  # tokenize query and passage and concatenate them
13
+ inp = tokenizer(['this is a query','query a is this'], ['this is a passage', 'passage a is this'], return_tensors='pt')
 
14
  # get estimated score
15
  print('score', model(**inp).logits[:, 1])
16
 
17
+ ### outputs identical scores for different
18
+ ### word orders as the model is order invariant:
19
+ # [-2.9463, -2.9463]
20
  ```