Shape Layers

class npdl.layers.Flatten(outdim=2)[source][source]
backward(pre_grad, *args, **kwargs)[source][source]

calculate the input gradient

connect_to(prev_layer)[source][source]

Propagates the given input through this layer (and only this layer).

Parameters:
prev_layer : previous layer

The previous layer to propagate through this layer.

forward(input, *args, **kwargs)[source][source]

Calculate layer output for given input (forward propagation).