new5558 commited on
Commit
3cad39a
1 Parent(s): c64c467

docs: fix readme

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -73,6 +73,7 @@ for sentX in sentenceL:
73
  inputList.append(sentence)
74
  tokenized_text = tokenizer(inputList, padding = True, return_tensors = 'pt')
75
  token_ids = tokenized_text['input_ids']
 
76
  with torch.no_grad():
77
  features = model(**tokenized_text, output_hidden_states = True).hidden_states[-1]
78
  ```
@@ -81,7 +82,7 @@ To use HoogBERTa as an embedding layer, use
81
 
82
  ```python
83
  with torch.no_grad():
84
- features = model(token_ids) # where token_ids is a tensor with type "long".
85
  ```
86
 
87
 
 
73
  inputList.append(sentence)
74
  tokenized_text = tokenizer(inputList, padding = True, return_tensors = 'pt')
75
  token_ids = tokenized_text['input_ids']
76
+
77
  with torch.no_grad():
78
  features = model(**tokenized_text, output_hidden_states = True).hidden_states[-1]
79
  ```
 
82
 
83
  ```python
84
  with torch.no_grad():
85
+ features = model(token_ids, output_hidden_states = True).hidden_states[-1] # where token_ids is a tensor with type "long".
86
  ```
87
 
88