adamtayzzz commited on
Commit
ff58e64
1 Parent(s): b971f22

Update whitebox_utils/classifier.py

Browse files
Files changed (1) hide show
  1. whitebox_utils/classifier.py +1 -0
whitebox_utils/classifier.py CHANGED
@@ -112,6 +112,7 @@ class MyClassifier():
112
  batch = self.tokenize(sent,idx=self.count)
113
  inputs = {"input_ids": batch[0], "attention_mask": batch[1], "token_type_ids":batch[2]}
114
  outputs = self.model(**inputs)[0] # get all logits
 
115
  output_ = [torch.softmax(output,dim=1)[0].detach().cpu().numpy() for output in outputs]
116
  ret.append(output_)
117
  return np.array(ret)
 
112
  batch = self.tokenize(sent,idx=self.count)
113
  inputs = {"input_ids": batch[0], "attention_mask": batch[1], "token_type_ids":batch[2]}
114
  outputs = self.model(**inputs)[0] # get all logits
115
+ print(outputs)
116
  output_ = [torch.softmax(output,dim=1)[0].detach().cpu().numpy() for output in outputs]
117
  ret.append(output_)
118
  return np.array(ret)