parameters: (encoded_inputs, max_seq_len=512)
return_statement: return encoded_inputs
docstring: truncate is often used in training process
docstring_summary: truncate is often used in training process
docstring_tokens: truncate is often used in training process
function: def split_page(encoded_inputs, max_seq_len=512):
      """
      truncate is often used in training process
      """
      for key in encoded_inputs:
          encoded_inputs[key] = paddle.to_tensor(encoded_inputs[key])
          if encoded_inputs[key].ndim <= 1:  # for input_ids, att_mask and so on
              encoded_inputs[key] = encoded_inputs[key].reshape([-1, max_seq_len])
          else:  # for bbox
              encoded_inputs[key] = encoded_inputs[key].reshape(
                  [-1, max_seq_len, 4])
      return encoded_inputs
function_tokens: def split_page ( encoded_inputs , max_seq_len = 512 ) : for key in encoded_inputs : encoded_inputs [ key ] = paddle . to_tensor ( encoded_inputs [ key ] ) if encoded_inputs [ key ] . ndim <= 1 : # for input_ids, att_mask and so on encoded_inputs [ key ] = encoded_inputs [ key ] . reshape ( [ - 1 , max_seq_len ] ) else : # for bbox encoded_inputs [ key ] = encoded_inputs [ key ] . reshape ( [ - 1 , max_seq_len , 4 ] ) return encoded_inputs