from tensorflow.python.framework import ops

# -- Register operations ------------------------------------------------------
bilateral_slice = _hdrnet.bilateral_slice
bilateral_slice_apply = _hdrnet.bilateral_slice_apply

# ----------- Register gradients ----------------------------------------------
@ops.RegisterGradient('BilateralSlice')
def _bilateral_slice_grad(op, grad):
  grid_tensor = op.inputs[0]
  guide_tensor = op.inputs[1]
  return _hdrnet.bilateral_slice_grad(grid_tensor, guide_tensor, grad)
