Removing debugging printing
This commit is contained in:
parent
9ad5adb33e
commit
68449ad678
|
@ -39,7 +39,6 @@ class Metric(ABC):
|
||||||
**kwargs (optional): Additional keyword arguments passed to the
|
**kwargs (optional): Additional keyword arguments passed to the
|
||||||
model.
|
model.
|
||||||
"""
|
"""
|
||||||
print(args, kwargs)
|
|
||||||
|
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
out = self.model(*args, **kwargs)[0]
|
out = self.model(*args, **kwargs)[0]
|
||||||
|
|
|
@ -64,7 +64,5 @@ class Adjust(object):
|
||||||
return mask
|
return mask
|
||||||
|
|
||||||
def absolute(self, mask: FloatTensor) -> FloatTensor:
|
def absolute(self, mask: FloatTensor) -> FloatTensor:
|
||||||
print("######################### MASK")
|
|
||||||
print(mask)
|
|
||||||
mask_ = torch.abs(mask)
|
mask_ = torch.abs(mask)
|
||||||
return mask_
|
return mask_
|
||||||
|
|
|
@ -26,7 +26,6 @@ def explanation_verification(exp: Explanation) -> bool:
|
||||||
def save_explanation(exp: Explanation, path: str) -> None:
|
def save_explanation(exp: Explanation, path: str) -> None:
|
||||||
data = copy.copy(exp).to_dict()
|
data = copy.copy(exp).to_dict()
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
print(k, v)
|
|
||||||
if isinstance(v, torch.Tensor):
|
if isinstance(v, torch.Tensor):
|
||||||
data[k] = v.detach().cpu().tolist()
|
data[k] = v.detach().cpu().tolist()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue