mirror of
https://github.com/facebookresearch/blt.git
synced 2025-01-18 16:37:46 +00:00
fix grad flow
This commit is contained in:
parent
5adf1c7133
commit
1ca0e04004
|
@ -540,7 +540,7 @@ class Patcher:
|
|||
if self.log_time:
|
||||
s = time.time()
|
||||
if entropies is not None:
|
||||
scores = entropies.clone().detach().to(dtype=torch.float32)
|
||||
scores = entropies.to(dtype=torch.float32)
|
||||
elif preds is not None:
|
||||
scores = entropy(preds)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue