@chenyuntc Thanks for your response!
features is the final layer output. and inp is the input to the sigmoid function.
def yolo_head(feats, anchors, num_classes):
      """Convert final layer features to bounding box parameters.

      Parameters
      ----------
      feats : tensor
             Final convolutional layer features.
      anchors : array-like
             Anchor box widths and heights.
      num_classes : int
             Number of target classes.

      Returns
      -------
      box_xy : tensor
              x, y box predictions adjusted by spatial location in conv layer.
      box_wh : tensor
             w, h box predictions adjusted by anchors and conv spatial resolution.
      box_conf : tensor
             Probability estimate for whether each box contains any object.
      box_class_pred : tensor
             Probability distribution estimate for each box over class labels.
      """
      feature = feats.numpy()
      feature = feature.transpose(0,2,3,1)

      num_anchors = len(anchors)
      # Reshape to batch, height, width, num_anchors, box_params.
      anchors_tensor = anchors.reshape([1, 1, 1, num_anchors, 2])
      conv_dims = feature.shape[1:3]

      conv_height_index = np.arange(0, stop=conv_dims[0])
      conv_width_index = np.arange(0, stop=conv_dims[1])

      conv_height_index = np.tile(conv_height_index, [conv_dims[1]])
      conv_width_index = np.tile(
               np.expand_dims(conv_width_index, 0), [conv_dims[0], 1])
      conv_width_index = (np.transpose(conv_width_index)).flatten()
      conv_index = np.transpose(np.stack([conv_height_index, conv_width_index]))
      conv_index = np.reshape(conv_index, [1, conv_dims[0], conv_dims[1], 1, 2])
      conv_index = conv_index.astype(float)
      feature = np.reshape(
            feature, [-1, conv_dims[0], conv_dims[1], num_anchors, num_classes + 5])
      conv_dims = np.reshape(conv_dims, [1, 1, 1, 1, 2]).astype(float)

      box_xy = sigmoid(feature[..., :2])
      box_wh = np.exp(feature[..., 2:4])        ***** Here is the location of warning*****
      box_confidence = sigmoid(feature[..., 4:5])
      box_class_probs = np.apply_along_axis(softmax,4,feature[..., 5:])

      box_xy = (box_xy + conv_index) / conv_dims
      box_wh = box_wh * anchors_tensor / conv_dims
      return box_xy, box_wh, box_confidence, box_class_probs 

Also for Calculating the softmax and sigmoid along a dimension, I wrote 2 functions as bellow:
def sigmoid(inp):
      return 1./(1 + np.exp(-1*inp))        **** Here is the other location of warning******

def softmax(x):
      """Compute softmax values for each sets of scores in x."""
      e_x = np.exp(x - np.max(x))
return e_x / e_x.sum()