from tensorflow.python.framework import ops

def _hard_label_shape(op):

  output_shape = op.inputs[0].get_shape()
  return [output_shape]

@ops.RegisterGradient("Hardlabel")
def _hard_label_grad(op, grad):

  bottom_prob = op.inputs[0]
  bottom_gt = op.inputs[1]
