elektronn2.neuromancer.various module¶
-
class
elektronn2.neuromancer.various.
GaussianRV
(**kwargs)[source]¶ Bases:
elektronn2.neuromancer.node_basic.Node
Parameters: - mu (node) – Mean of the Gaussian density
- sig (node) – Sigma of the Gaussian density
- n_samples (int) – Number of samples to be drawn per instance. Special case ‘0’: draw 1 sample but don’t’ increase rank of tensor!
- output is a sample from separable Gaussians of given mean and (The) –
- (but this operation is still differentiable, due to the (sigma) –
- trick") ("re-parameterisation) –
- output dimension mu.ndim+1 because the samples are accumulated along (The) –
- new axis right of 'b' (batch) (a) –
-
elektronn2.neuromancer.various.
SkelLoss
(pred, loss_kwargs, skel=None, name='skel_loss', print_repr=True)[source]¶
-
class
elektronn2.neuromancer.various.
SkelPrior
(**kwargs)[source]¶ Bases:
elektronn2.neuromancer.node_basic.Node
pred must be a vector of shape [(1,b),(3,f)] or [(3,f)] i.e. only batch_size=1 is supported.
Parameters: - pred –
- target_length –
- prior_n –
- prior_posz –
- prior_z –
- prior_xy –
- name –
- print_repr –
-
elektronn2.neuromancer.various.
Scan
(step_result, in_memory, out_memory=None, in_iterate=None, in_iterate_0=None, n_steps=None, unroll_scan=True, last_only=False, name='scan', print_repr=True)[source]¶ Parameters: - step_result (node/list(nodes)) – nodes that represent results of step function
- in_memory (node/list(nodes)) – nodes that indicate at which place in the computational graph
the memory is feed back into the step function. If
out_memory
is not specified this must contain a node for every node instep_result
because then the whole result will be fed back. - out_memory (node/list(nodes)) – (optional) must be subset of
step_result
and of same length asin_memory
, tells which nodes of the result are fed back toin_memory
. IfNone
, all are fed back. - in_iterate (node/list(nodes)) – nodes with a leading
'r'
axis to be iterated over (e.g. time series of shape [(30,r),(100,b),(50,f)]). In every step a slice from the first axis is consumed. - in_iterate_0 (node/list(nodes)) – nodes that consume a single slice of the
in_iterate
nodes. Part of “the inner function” of the scan loop in contrast toin_iterate
- n_steps (int) –
- unroll_scan (bool) –
- last_only (bool) –
- name (str) –
- print_repr (bool) –
Returns: - A node for every node in
step_result
which either contains the last - state or the series of states - then it has a leading
'r'
axis.
-
elektronn2.neuromancer.various.
SkelGetBatch
(skel, aux, img_sh, t_img_sh, t_grid_sh, t_node_sh, get_batch_kwargs, scale_strenght=None, name='skel_batch')[source]¶
-
class
elektronn2.neuromancer.various.
SkelLossRec
(**kwargs)[source]¶ Bases:
elektronn2.neuromancer.node_basic.Node
pred must be a vector of shape [(1,b),(3,f)] or [(3,f)] i.e. only batch_size=1 is supported.
Parameters: - pred –
- skel –
- loss_kwargs –
- name –
- print_repr –
-
class
elektronn2.neuromancer.various.
Reshape
(**kwargs)[source]¶ Bases:
elektronn2.neuromancer.node_basic.Node
Reshape node.
Parameters: - parent –
- shape –
- tags –
- strides –
- fov –
- name –
- print_repr –