def fro_norm(input, porder=2, axis=[(- 1)]):
    '\n        NOTE:\n            Calculate the frobenius norm of a square matrix or batches of square matrices.\n        '
    reduce_all = (True if ((axis is None) or (axis == [])) else False)
    keepdim = False
    if paddle.in_dynamic_mode():
        pow_out = _C_ops.pow(input, 'factor', porder)
        sum_out_1 = _C_ops.reduce_sum(pow_out, 'dim', axis, 'keepdim', keepdim, 'reduce_all', reduce_all)
        sum_out_2 = _C_ops.reduce_sum(sum_out_1, 'dim', axis, 'keepdim', keepdim, 'reduce_all', reduce_all)
        return _C_ops.pow(sum_out_2, 'factor', float((1.0 / porder)))
    block = LayerHelper('norm', **locals())
    pow_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    sum_out_1 = block.create_variable_for_type_inference(dtype=block.input_dtype())
    sum_out_2 = block.create_variable_for_type_inference(dtype=block.input_dtype())
    out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='pow', inputs={'X': input}, outputs={'Out': pow_out}, attrs={'factor': porder})
    block.append_op(type='reduce_sum', inputs={'X': pow_out}, outputs={'Out': sum_out_1}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': reduce_all})
    block.append_op(type='reduce_sum', inputs={'X': sum_out_1}, outputs={'Out': sum_out_2}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': reduce_all})
    block.append_op(type='pow', inputs={'X': sum_out_2}, outputs={'Out': out}, attrs={'factor': float((1.0 / porder))})
    return out
NOTE:
    Calculate the frobenius norm of a square matrix or batches of square matrices.
def fro_norm(input, porder=2, axis=[(- 1)]):
    '\n        NOTE:\n            Calculate the frobenius norm of a square matrix or batches of square matrices.\n        '
    reduce_all = (True if ((axis is None) or (axis == [])) else False)
    keepdim = False
    if paddle.in_dynamic_mode():
        pow_out = _C_ops.pow(input, 'factor', porder)
        sum_out_1 = _C_ops.reduce_sum(pow_out, 'dim', axis, 'keepdim', keepdim, 'reduce_all', reduce_all)
        sum_out_2 = _C_ops.reduce_sum(sum_out_1, 'dim', axis, 'keepdim', keepdim, 'reduce_all', reduce_all)
        return _C_ops.pow(sum_out_2, 'factor', float((1.0 / porder)))
    block = LayerHelper('norm', **locals())
    pow_out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    sum_out_1 = block.create_variable_for_type_inference(dtype=block.input_dtype())
    sum_out_2 = block.create_variable_for_type_inference(dtype=block.input_dtype())
    out = block.create_variable_for_type_inference(dtype=block.input_dtype())
    block.append_op(type='pow', inputs={'X': input}, outputs={'Out': pow_out}, attrs={'factor': porder})
    block.append_op(type='reduce_sum', inputs={'X': pow_out}, outputs={'Out': sum_out_1}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': reduce_all})
    block.append_op(type='reduce_sum', inputs={'X': sum_out_1}, outputs={'Out': sum_out_2}, attrs={'dim': axis, 'keep_dim': keepdim, 'reduce_all': reduce_all})
    block.append_op(type='pow', inputs={'X': sum_out_2}, outputs={'Out': out}, attrs={'factor': float((1.0 / porder))})
    return out