This change will allow the user to have an image object passed back from calling plot_errors(), which gives the user more processing options then the current show parameter
It will allow users more direct control of how they process the plot_errors() visual, whether it be saving to disk or placing in a GUI canvas.
Explanation of changes
Added a new parameter called image to the plot_errors() function that will funnel down to plot_optimizer_errors() and cause an image object to be returned instead of
the functionality the show paramater has of having a matplotlib window open and showing the figure
How it will affect existing code
Unless the image parameter is explicitly set to True, existing code will behave exactly as before. Adds another means to bypass matplotlibs blocking behavior.
Also, adds Pillow as a dependency.
Summary
This change will allow the user to have an image object passed back from calling
plot_errors()
, which gives the user more processing options then the current show parameterAddresses:
https://github.com/itdxer/neupy/issues/251
Why it is useful
It will allow users more direct control of how they process the
plot_errors()
visual, whether it be saving to disk or placing in a GUI canvas.Explanation of changes
Added a new parameter called image to the
plot_errors()
function that will funnel down toplot_optimizer_errors()
and cause an image object to be returned instead of the functionality the show paramater has of having a matplotlib window open and showing the figureHow it will affect existing code
Unless the image parameter is explicitly set to
True
, existing code will behave exactly as before. Adds another means to bypass matplotlibs blocking behavior. Also, adds Pillow as a dependency.Example
An example of this modification working within an application can be found below: https://github.com/DPR-Sanchez/neural-net-models/tree/canvas-feature