Class: ReflectionPadFilter

ReflectionPadFilter

This filter performs 'reflection' or 'mirrored' padding, e.g. [1, 2, 3] with paddings [2, 1] (before, after) becomes [3, 2, 1, 2, 3, 2]. The boundaries are not repeated, which resembles TensorFlows behaviour.

The current implementation is large and rather slow, adding ~2 seconds overhead to a full style model run for the default sample image on my machine.

Inputs: x: <1,2,4>D tensor paddings: number[[number, number]] - Before/after pad for each dim