original_docstring: 
      Cost Volume - each pixel in img_L concat horizontally across img_R
      
docstring: Cost Volume - each pixel in img_L concat horizontally across img_R
docstring_tokens: Cost Volume - each pixel in img_L concat horizontally across img_R
code: def cost_volume(img_L, img_R, d_size):
      """
      Cost Volume - each pixel in img_L concat horizontally across img_R
      """
      d = int(d_size/2 - 1)
      dp_list = []
  
      # when disparity is 0
      elw_tf = tf.concat([img_L, img_R], 3)
      dp_list.append(elw_tf)
      
      # right side
      for dis in range(d):
          # moving the features by disparity d can be done by padding zeros
          pad = tf.constant([[0,0],[0,0],[dis+1,0],[0,0]], dtype=tf.int32)
          pad_R = tf.pad(img_R[:, :, :-1-dis, :], pad, "CONSTANT")
          elw_tf = tf.concat([img_L, pad_R], 3)
          dp_list.append(elw_tf)
      
      total_pack_tf = tf.concat(dp_list, 0)
      total_pack_tf = tf.expand_dims(total_pack_tf, 0)
      return total_pack_tf
code_tokens: def cost_volume ( img_L , img_R , d_size ) : d = int ( d_size / 2 - 1 ) dp_list = [ ] elw_tf = tf . concat ( [ img_L , img_R ] , 3 ) dp_list . append ( elw_tf ) for dis in range ( d ) : pad = tf . constant ( [ [ 0 , 0 ] , [ 0 , 0 ] , [ dis + 1 , 0 ] , [ 0 , 0 ] ] , dtype = tf . int32 ) pad_R = tf . pad ( img_R [ : , : , : - 1 - dis , : ] , pad , "CONSTANT" ) elw_tf = tf . concat ( [ img_L , pad_R ] , 3 ) dp_list . append ( elw_tf ) total_pack_tf = tf . concat ( dp_list , 0 ) total_pack_tf = tf . expand_dims ( total_pack_tf , 0 ) return total_pack_tf
short_docstring: Cost Volume - each pixel in img_L concat horizontally across img_R
short_docstring_tokens: Cost Volume - each pixel in img_L concat horizontally across img_R
comment: """
      Cost Volume - each pixel in img_L concat horizontally across img_R
      """$SEP$# when disparity is 0$SEP$# right side$SEP$# moving the features by disparity d can be done by padding zeros