You should use op_lifter from gpuarray.opt.  It would go something like this:
```
@op_lifter([Images2Neibs])
def use_gpu_image2neibs(node):
    if node.op.mode in ['valid', 'ignore_borders', 'wrap_centered']:
        return GpuImage2Neibs(node.op.mode)
```