|
|
_fork(self)
Fork the internal node in the clone layer. |
|
|
|
|
_join(self,
forked_node)
Join the internal node in the clone layer. |
|
|
|
|
use_execute_fork(self)
Return True if node requires a fork / join even during execution. |
|
|
|
Inherited from unreachable.newobject:
__long__,
__native__,
__nonzero__,
__unicode__,
next
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__subclasshook__
|
|
|
__init__(self,
node,
n_nodes=1,
dtype=None)
Setup the layer with the given list of nodes. |
|
|
|
|
_stop_training(self,
*args,
**kwargs)
Stop training of the internal node. |
|
|
|
|
stop_training(self,
*args,
**kwargs)
Stop training of the internal node. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_check_props(self,
dtype)
Check the compatibility of the properties of the internal nodes. |
|
|
|
|
_execute(self,
x,
*args,
**kwargs)
Process the data through the internal nodes. |
|
|
|
|
|
|
|
|
|
|
|
|
|
_inverse(self,
x,
*args,
**kwargs)
Combine the inverse of all the internal nodes. |
|
|
|
|
|
|
|
|
|
|
_train(self,
x,
*args,
**kwargs)
Perform single training step by training the internal nodes. |
|
|
|
|
execute(self,
x,
*args,
**kwargs)
Process the data through the internal nodes. |
|
|
|
|
inverse(self,
x,
*args,
**kwargs)
Combine the inverse of all the internal nodes. |
|
|
|
|
is_invertible(self)
Return True if the node can be inverted, False otherwise. |
|
|
|
|
is_trainable(self)
Return True if the node can be trained, False otherwise. |
|
|
|
|
train(self,
x,
*args,
**kwargs)
Perform single training step by training the internal nodes. |
|
|
|
|
|
|
|
fork(self)
Return a new instance of this node class for remote training. |
|
|
|
|
join(self,
forked_node)
Absorb the trained node from a fork into this parent node. |
|
|
|
|
|
|
|
__call__(self,
x,
*args,
**kwargs)
Calling an instance of Node is equivalent to calling
its execute method. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_refcast(self,
x)
Helper function to cast arrays to the internal dtype. |
|
|
|
|
|
|
|
|
|
|
copy(self,
protocol=None)
Return a deep copy of the node. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
is_training(self)
Return True if the node is in the training phase,
False otherwise. |
|
|
|
|
save(self,
filename,
protocol=-1)
Save a pickled serialization of the node to filename.
If filename is None, return a string. |
|
|
|
|
set_dtype(self,
t)
Set internal structures' dtype. |
|
|
|
|
|
|
|
|