elektronn2.utils.d3viz package¶
Submodules¶
elektronn2.utils.d3viz.formatting module¶
Visualisation code taken form Theano Original Author: Christof Angermueller <cangermueller@gmail.com> Adapted with permission for the ELEKTRONN2 Toolkit by Marius Killinger 2016 Note that this code is licensed under the original terms of Theano (see license containing directory).
-
class
elektronn2.utils.d3viz.formatting.
PyDotFormatter2
(compact=True)[source]¶ Bases:
object
Create pydot graph object from Theano function.
Parameters: compact (bool) – if True, will remove intermediate variables without name. -
node_colors
¶ dict – Color table of node types.
-
apply_colors
¶ dict – Color table of apply nodes.
-
shapes
¶ dict – Shape table of node types.
-
-
elektronn2.utils.d3viz.formatting.
escape_quotes
(s)[source]¶ Escape quotes in string.
Parameters: s (str) – String on which function is applied
-
elektronn2.utils.d3viz.formatting.
replace_patterns
(x, replace)[source]¶ Replace replace in string x.
Parameters: - s (str) – String on which function is applied
- replace (dict) – key, value pairs where key is a regular expression and value a string by which key is replaced
-
elektronn2.utils.d3viz.formatting.
visualise_model
(model, outfile, copy_deps=True, select_outputs=None, image_format='png', *args, **kwargs)[source]¶ Parameters: - model (model object) –
- outfile (str) – Path to output HTML file.
- copy_deps (bool, optional) – Copy javascript and CSS dependencies to output directory.
Notes
This function accepts extra parameters which will be forwarded to
theano.d3viz.formatting.PyDotFormatter
.