You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
representation_for_plotting() it looks like could be documented more maybe, or maybe it's just something meant to be hidden away and changes a lot -- it does clearly say it's there to be used by plot_representation() as a helper function so it's probably ok that it is sort of an anomaly in terms of documentation 😆
[high-level suggestion] Moving the visualization elsewhere. I think that having a method instead of a utility function call is not enough to justify all those lines of code for plotting in a class that that performs computation.
General comment about these plotting methods. Could they be moved out of the class? everything else is super clean and it is implementing the calculations for the model. in a way plotting seems out of scope, and the plotting is a lot of lines.
How specific is the plotting to the model structure? at a first glance, you need the scales and the necessary dict structure self._necessary_stats_dict, if you are able to provide the tensor and a metadata that is sufficient to convert to dict to a plotting function you should be able to have an external utility function that plots given the output tensor and the metadata.
me:
yeah, I don't love how I'm handling plotting right now. the idea is that plotting for every model will be different and the way to combine from the complete representation into a format for plotting is model-specific and not obvious. This gets called in the synthesis plotting code (which you can see in the PortillaSimoncelli notebook or the Metamer notebook): we just call model.plot_representation() and, if that method doesn't exist, use some default (single stem plot if the representation looks like a vector, image plot if it looks like an image). I didn't want to try and get more any clever.
But I'm not super happy with how I handle plotting, because it is messy, like you said. I'd be happy to talk about this more. But this might end up being a separate PR.
The text was updated successfully, but these errors were encountered:
Following discussion with Eric and Edoardo on #225 , should rethink how to handle plotting. Copying relevant comments here:
@EricThomson:
@BalzaniEdoardo:
me:
The text was updated successfully, but these errors were encountered: