From 9939abdada0cd768277ae8efcce1d405ac850ede Mon Sep 17 00:00:00 2001 From: farazk86 <33456896+farazk86@users.noreply.github.com> Date: Sat, 20 Mar 2021 21:14:05 +0000 Subject: [PATCH] fixed cause of AttributeError in callback on line ``39``, ```python l.append(v.item()) ``` gives the error: > AttributeError: 'float' object has no attribute 'item' changing to ``l.append(v)`` fixed this --- birdwatch/callbacks/trainingmonitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdwatch/callbacks/trainingmonitor.py b/birdwatch/callbacks/trainingmonitor.py index e9cc156..6cfc462 100644 --- a/birdwatch/callbacks/trainingmonitor.py +++ b/birdwatch/callbacks/trainingmonitor.py @@ -36,7 +36,7 @@ def on_epoch_end(self, epoch, logs={}): # for the entire training process for (k, v) in logs.items(): l = self.H.get(k, []) - l.append(v.item()) + l.append(v) self.H[k] = l # check to see if the training history should be serialized @@ -84,4 +84,4 @@ def on_epoch_end(self, epoch, logs={}): # save the figure plt.savefig(self.figPath) - plt.close() \ No newline at end of file + plt.close()