mirror of
https://github.com/clearml/clearml
synced 2025-04-28 18:22:39 +00:00
Fix FastAI performance (#1234)
This commit is contained in:
parent
4625f057d1
commit
3fde18f6f6
@ -276,17 +276,6 @@ class PatchFastaiV2(object):
|
||||
value=metric.value,
|
||||
iteration=self.__train_iter,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def before_step(self):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
if hasattr(fastai.learner.Recorder, "before_step"):
|
||||
super().before_step() # noqa
|
||||
if not PatchFastaiV2._current_task:
|
||||
return
|
||||
logger = PatchFastaiV2._current_task.get_logger()
|
||||
gradients = [
|
||||
x.grad.clone().detach().cpu() for x in self.learn.model.parameters() if x.grad is not None
|
||||
] # noqa
|
||||
|
Loading…
Reference in New Issue
Block a user