opto.trace.nodes#

Module Contents#

Classes#

Graph

AbstractNode

NodeVizStyleGuide

NodeVizStyleGuideColorful

Node

ParameterNode

MessageNode

ExceptionNode

Functions#

node

get_op_name

Data#

NAME_SCOPES

GRAPH

USED_NODES

T

IDENTITY_OPERATORS

API#

node(data, name=None, trainable=False, description=None, constraint=None)[source]#
NAME_SCOPES = []#
class Graph[source]#

Initialization

TRACE = True#
clear()[source]#
register(node)[source]#
get(name)[source]#
property roots#
GRAPH = 'Graph(...)'#
USED_NODES = 'list(...)'#
T = 'TypeVar(...)'#
class AbstractNode(value, *, name=None, trainable=False)[source]#

Bases: typing.Generic[opto.trace.nodes.T]

Initialization

property data#
property parents#
property children#
property name#
property py_name#
property id#
property level#
property is_root#
property is_leaf#
lt(other)[source]#
gt(other)[source]#
IDENTITY_OPERATORS = ('identity', 'clone')#
get_op_name(description)[source]#
class NodeVizStyleGuide(style='default', print_limit=100)[source]#

Initialization

get_attrs(x)[source]#
get_label(x)[source]#
get_node_shape(x)[source]#
get_color(x)[source]#
get_style(x)[source]#
class NodeVizStyleGuideColorful(style='default', print_limit=100)[source]#

Bases: opto.trace.nodes.NodeVizStyleGuide

Initialization

get_attrs(x)[source]#
get_border_color(x)[source]#
get_color(x)[source]#
get_style(x)[source]#
class Node(value: Any, *, name: str = None, trainable: bool = False, description: str = '[Node] This is a node in a computational graph.', constraint: Union[None, str] = None, info: Union[None, Dict] = None)[source]#

Bases: opto.trace.nodes.AbstractNode[opto.trace.nodes.T]

Initialization

zero_feedback()[source]#
property feedback#
property description#
property info#
property type#
property parameter_dependencies#
property expandable_dependencies#
backward(feedback: Any = '', propagator=None, retain_graph=False, visualize=False, simple_visualization=True, reverse_plot=False, print_limit=100)[source]#
clone()[source]#
detach()[source]#
getattr(key)[source]#
call(fun: str, *args, **kwargs)[source]#
len()[source]#
eq(other)[source]#
neq(other)[source]#
format(*args, **kwargs)[source]#
capitalize()[source]#
lower()[source]#
upper()[source]#
swapcase()[source]#
title()[source]#
split(sep=None, maxsplit=-1)[source]#
strip(chars=None)[source]#
replace(old, new, count=-1)[source]#
join(seq)[source]#
items()[source]#
values()[source]#
keys()[source]#
pop(__index=-1)[source]#
append(*args, **kwargs)[source]#
class ParameterNode(value, *, name=None, trainable=True, description='[ParameterNode] This is a ParameterNode in a computational graph.', constraint=None, info=None)[source]#

Bases: opto.trace.nodes.Node[opto.trace.nodes.T]

class MessageNode(value, *, inputs: Union[List[opto.trace.nodes.Node], Dict[str, opto.trace.nodes.Node]], description: str, constraint=None, name=None, info=None)[source]#

Bases: opto.trace.nodes.Node[opto.trace.nodes.T]

Initialization

property inputs#
property hidden_dependencies#
class ExceptionNode(value: Exception, *, inputs: Union[List[opto.trace.nodes.Node], Dict[str, opto.trace.nodes.Node]], description: str = '[ExceptionNode] This is node containing the error of execution.', constraint=None, name=None, info=None)[source]#

Bases: opto.trace.nodes.MessageNode[opto.trace.nodes.T]

Initialization

create_feedback(style='simple')[source]#