解决Bert 报错:AttributeError: ‘str‘ object has no attribute ‘softmax‘
解决Bert 报错:AttributeError: ‘str’ object has no attribute ‘softmax’需要将这里改为:output= self.bert(input_ids = batch_seqs, attention_mask = batch_seq_masks,token_type_ids=batch_seq_segments, labels = labels)l
·
解决Bert 报错:AttributeError: ‘str’ object has no attribute ‘softmax’
需要将这里改为:
output= self.bert(input_ids = batch_seqs, attention_mask = batch_seq_masks,token_type_ids=batch_seq_segments, labels = labels)
loss = output.loss
logits = output.logits
更多推荐
已为社区贡献3条内容
所有评论(0)