(bboxes, anchors)
return tf.stack([delta_x, delta_y, delta_w, delta_h], axis=1)
Args:
     bboxes: [num_bboxes, 4]
     anchors: [num_bboxes, 4]
  Return:
    deltas: [num_bboxes, 4]
Args:
     bboxes: [num_bboxes, 4]
     anchors: [num_bboxes, 4]
  Return:
    deltas: [num_bboxes, 4]
Args : bboxes : [ num_bboxes 4 ] anchors : [ num_bboxes 4 ] Return : deltas : [ num_bboxes 4 ]
def batch_delta(bboxes, anchors):
  """
  Args:
     bboxes: [num_bboxes, 4]
     anchors: [num_bboxes, 4]
  Return:
    deltas: [num_bboxes, 4]
  """
  bbox_x, bbox_y, bbox_w, bbox_h = tf.unstack(bboxes, axis=1)
  anchor_x, anchor_y, anchor_w, anchor_h = tf.unstack(anchors, axis=1)
  delta_x = (bbox_x - anchor_x) / bbox_w
  delta_y = (bbox_y - anchor_y) / bbox_h
  delta_w = tf.log(bbox_w / anchor_w)
  delta_h = tf.log(bbox_h / anchor_h)
  return tf.stack([delta_x, delta_y, delta_w, delta_h], axis=1)
def batch_delta ( bboxes , anchors ) : bbox_x , bbox_y , bbox_w , bbox_h = tf . unstack ( bboxes , axis = 1 ) anchor_x , anchor_y , anchor_w , anchor_h = tf . unstack ( anchors , axis = 1 ) delta_x = ( bbox_x - anchor_x ) / bbox_w delta_y = ( bbox_y - anchor_y ) / bbox_h delta_w = tf . log ( bbox_w / anchor_w ) delta_h = tf . log ( bbox_h / anchor_h ) return tf . stack ( [ delta_x , delta_y , delta_w , delta_h ] , axis = 1 )