stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 142 forks source link

'Plot2d' object has no attribute 'set_output_mode' #137

Open deepak-s-h opened 2 years ago

deepak-s-h commented 2 years ago

🐛 Bug description

The example notebook on 2d prediction maps throws the following error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_22241/3692360535.py in <module>
      5                                     margin=0.2, h=0.02, device=device)
      6 plot2d.predict = plot2d._predict_pytorch
----> 7 liveloss = PlotLosses(outputs=[plot2d])
      8 
      9 criterion = nn.CrossEntropyLoss()

/usr/local/lib/python3.8/dist-packages/livelossplot/plot_losses.py in __init__(self, outputs, mode, **kwargs)
     30         self.outputs = [getattr(livelossplot.outputs, out)() if isinstance(out, str) else out for out in outputs]
     31         for out in self.outputs:
---> 32             out.set_output_mode(mode)
     33 
     34     def update(self, *args, **kwargs):

AttributeError: 'Plot2d' object has no attribute 'set_output_mode'

Environment

stared commented 2 years ago

Thanks for reporting @riskmlintern

@Bartolo1024, could you look at that?