pytorchart.presets package¶
Submodules¶
pytorchart.presets.functional module¶
-
class
pytorchart.presets.functional.
LayerLegend
[source]¶ Bases:
object
keeps track of layers and assigned Colors
-
pytorchart.presets.functional.
generate_layers
(model, colors=None, fn=None, targets=[])[source]¶ Parameters: - model –
- colors –
- fn –
- targets –
Returns:
-
pytorchart.presets.functional.
summarize
(model, fn=<function _identity>)[source]¶ Given a nn.Module, recursively walk its submodules and apply a function
Parameters: - model – nn.Module or superclass thereof
- fn – function to be applied to any module to create a summary
Returns: list of summaries generated by fn(module)
pytorchart.presets.preconfigured module¶
-
class
pytorchart.presets.preconfigured.
Config
[source]¶ Bases:
object
Static object for generating meter and plot configurations
-
classmethod
default_cfg
()[source]¶ return a the base configuration for plot and meter :return: dict
Usage: Config.default_cfg()
-
classmethod
gen_plot
(*keys, phases=None, plot=None)[source]¶ Creates a plot from the specified keys.
Parameters: - keys – list of strings
- phases – list of strings or None. If None, it will use default
phases of [‘test’, [‘train’] :param plot: name of plot
Returns: tuple of dicts for plots and meters
-
classmethod
get_presets
(*keys, phases=None)[source]¶ generate a dictionary of plots and meters given preconfigured keys. This will create a meter by key by phase.
Parameters: - keys – list of strings
- phases – list of strings or None. If None, it will use default
phases of [‘test’, [‘train’]
Returns: tuple of dicts for plots and meters
-
classmethod