Spaces:
Runtime error
Runtime error
Update src/model_utils.py
Browse files82 unmodified lines8384858687888982 unmodified linesfor i in range(min(k-1, self.num_classes-1)):slopes.append(sorted_probs[:, i] - sorted_probs[:, i+1])avg_slope = torch.mean(torch.stack(slopes), dim=0)return avg_slope * kelif metric == 'ensemble':max_conf = torch.max(probs, dim=1)[0]top2 = torch.topk(probs, 2, dim=1)[0]82 unmodified lines8384858687888982 unmodified linesfor i in range(min(k-1, self.num_classes-1)):slopes.append(sorted_probs[:, i] - sorted_probs[:, i+1])avg_slope = torch.mean(torch.stack(slopes), dim=0)return avg_slopeelif metric == 'ensemble':max_conf = torch.max(probs, dim=1)[0]top2 = torch.topk(probs, 2, dim=1)[0]
src/model_utils.py+1-1