def p_matrix_norm(input, porder=1.0, axis=axis, keepdim=False, name=None):
    '\n        NOTE:\n            This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.\n        '
    block = LayerHelper('norm', **locals())
    out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    abs_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='abs', inputs={'X': input}, outputs={'Out': abs_out})
    pow_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='pow', inputs={'X': abs_out}, outputs={'Out': pow_out}, attrs={'factor': porder})
    sum_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='reduce_sum', inputs={'X': pow_out}, outputs={'Out': sum_out}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': (True if (axis is None) else False)})
    porder
    block.append_op(type='pow', inputs={'X': sum_out}, outputs={'Out': out}, attrs={'factor': float((1.0 / porder))})
    return out
NOTE:
    This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.
def p_matrix_norm(input, porder=1.0, axis=axis, keepdim=False, name=None):
    '\n        NOTE:\n            This function actually treats the matrix as flattened vector to calculate vector norm instead of matrix norm.\n        '
    block = LayerHelper('norm', **locals())
    out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    abs_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='abs', inputs={'X': input}, outputs={'Out': abs_out})
    pow_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='pow', inputs={'X': abs_out}, outputs={'Out': pow_out}, attrs={'factor': porder})
    sum_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='reduce_sum', inputs={'X': pow_out}, outputs={'Out': sum_out}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': (True if (axis is None) else False)})
    porder
    block.append_op(type='pow', inputs={'X': sum_out}, outputs={'Out': out}, attrs={'factor': float((1.0 / porder))})
    return out