(gt_box, anchor)
return tf.stack([delta_x, delta_y, delta_w, delta_h], axis=0)
Compute delta, anchor+delta = gt_box. Box format '[cx, cy, w, h]'.
  Args:
    gt_box: A batch of boxes. 2-D with shape `[B, 4]`.
    anchor: A single box. 1-D with shape `[4]`.

  Returns:
    delta: 1-D tensor with shape '[4]', [dx, dy, dw, dh]
Compute delta, anchor+delta = gt_box. Box format '[cx, cy, w, h]'.
  Args:
    gt_box: A batch of boxes. 2-D with shape `[B, 4]`.
    anchor: A single box. 1-D with shape `[4]`.
Compute delta anchor + delta = gt_box . Box format [ cx cy w h ] . Args : gt_box : A batch of boxes . 2 - D with shape [ B 4 ] . anchor : A single box . 1 - D with shape [ 4 ] .
def compute_delta(gt_box, anchor):
  """Compute delta, anchor+delta = gt_box. Box format '[cx, cy, w, h]'.
  Args:
    gt_box: A batch of boxes. 2-D with shape `[B, 4]`.
    anchor: A single box. 1-D with shape `[4]`.

  Returns:
    delta: 1-D tensor with shape '[4]', [dx, dy, dw, dh]
  """
  delta_x = (gt_box[0] - anchor[0]) / gt_box[2]
  delta_y = (gt_box[1] - anchor[1]) / gt_box[3]
  delta_w = tf.log(gt_box[2] / anchor[2])
  delta_h = tf.log(gt_box[3] / anchor[3])
  return tf.stack([delta_x, delta_y, delta_w, delta_h], axis=0)
def compute_delta ( gt_box , anchor ) : delta_x = ( gt_box [ 0 ] - anchor [ 0 ] ) / gt_box [ 2 ] delta_y = ( gt_box [ 1 ] - anchor [ 1 ] ) / gt_box [ 3 ] delta_w = tf . log ( gt_box [ 2 ] / anchor [ 2 ] ) delta_h = tf . log ( gt_box [ 3 ] / anchor [ 3 ] ) return tf . stack ( [ delta_x , delta_y , delta_w , delta_h ] , axis = 0 )