I am having a bit of difficulty in implementing a custom layer for ReflectionPad3d as this is not implemented in the official release.
What I have tried is this:
import torch
import torch.nn.functional as F

class ReflectionPad3d(torch.nn.Module):
  def __init__(self, padding):
    self.padding = padding
  def forward(self, x):
    return F.pad(x. self.padding, mode='reflect')

Aim is to wrap the functional as a module. But then I actually discovered that "reflect" for 3d padding is not implemented.
Is there a way to get 3d reflection padding?