jwieting commited on
Commit
5d4de09
1 Parent(s): 5645e15

Update modeling_paragram_sp.py

Browse files
Files changed (1) hide show
  1. modeling_paragram_sp.py +1 -1
modeling_paragram_sp.py CHANGED
@@ -21,7 +21,7 @@ class ParagramSPModel(BertPreTrainedModel):
21
  filtered_ids.append(j)
22
  if len(filtered_ids) == 0:
23
  filtered_ids = [0]
24
- output.append(filtered_ids + [self.config.pad_token_id] * (length - length(filtered_ids)))
25
  return torch.tensor(output)
26
 
27
  def forward(self, input_ids, attention_mask):
 
21
  filtered_ids.append(j)
22
  if len(filtered_ids) == 0:
23
  filtered_ids = [0]
24
+ output.append(filtered_ids + [self.config.pad_token_id] * (length - len(filtered_ids)))
25
  return torch.tensor(output)
26
 
27
  def forward(self, input_ids, attention_mask):