Skip to content

Commit bda3ed7

Browse files
committed
remove print statement that fails for batch of size >1
1 parent 1a13718 commit bda3ed7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

chebai/result/analyse_sem.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,6 @@ def __call__(self, preds):
205205
for p in self.chebi_graph.successors(int(label))
206206
] + [i]
207207
if len(succs) > 0:
208-
if torch.max(preds[:, succs], dim=1).values > 0.5 and preds[:, i] < 0.5:
209-
print(
210-
f"Correcting prediction for {label} to max of subclasses {list(self.chebi_graph.successors(int(label)))}"
211-
)
212-
print(
213-
f"Original pred: {preds[:, i]}, successors: {preds[:, succs]}"
214-
)
215208
preds[:, i] = torch.max(preds[:, succs], dim=1).values
216209
if torch.sum(preds) != preds_sum_orig:
217210
print(f"Preds change (step 1): {torch.sum(preds) - preds_sum_orig}")

0 commit comments

Comments
 (0)