Untitled
raw download clone
TEXT
views 31
,
size 1204 b
ValueError                                Traceback (most recent call last)
<ipython-input-95-b332f2440823> in <module>()
     21     print(train_accuracy)
     22     valid_accuracy = accuracy_score(y_val, s.run(classes, {input_X: X_val_flat}))
---> 23     simpleTrainingCurves.add(train_loss, val_loss, train_accuracy, valid_accuracy)

~/work/week2/v2/matplotlib_utils.py in add(self, train_loss, valid_loss, train_metric, valid_metric)
     79         self.ax1.set_xlim(0, self.iter)
     80         self.ax2.set_xlim(0, self.iter)
---> 81         self._update_y_limits(self.y_limits_1, train_loss, valid_loss)
     82         self._update_y_limits(self.y_limits_2, train_metric, valid_metric)
     83         self._set_y_limits(self.ax1, self.y_limits_1)

~/work/week2/v2/matplotlib_utils.py in _update_y_limits(self, limits, *values)
     60 
     61     def _update_y_limits(self, limits, *values):
---> 62         limits[0] = min(list(values) + ([limits[0]] if limits[0] else []))
     63         limits[1] = max(list(values) + ([limits[1]] if limits[1] else []))
     64 

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
close fullscreen
Login or Register to edit or fork this paste. It's free.