14.4. Dequeue
Dequeue as computational node.
Dequeue as a node, forward is dequeue, backward is dequeue, the exact inverse of the dequeue node as we name it for the forward pass.
See: Comp-sci queues
- class fhez.nn.operations.dequeue.Dequeue(length=None)
Stack multiple arrays together until a given shape is achieved.
- backward(gradient: numpy.ndarray)
Accumulate inputs into a single queue, then return when full.
- property cost
Get 0 cost for dequeueing arrays.
- forward(x)
Distribute input to respective outputs in order via yield.
Effectiveley backward is a dequeue but for gradients.
Warning
This YIELDS gradients unlike most nodes, requiring special logic by a network traverser, only getting one input but results in many outputs.
- property length
Get the desired length of the final dequeue.
- property queue
Get the current queue.
- update()
Update nothing as dequeueing is not parameterisable.
- updates()
Update nothing as dequeueing is not parameterisable.