例如:
在定义的a_1函数上方使用函数装饰器
@b_1()
相当于运行了一次b_1(a_1)然后将其赋值给a_1
而且这个过程自动运行,debug无法停止其过程
mmdet和mmrotate中用了大量的函数装饰器
在看这部分的时候感觉mmdet和mmrotate里面的部分的组件没办法debug有可能是这个原因
def b_1(B):
print('我是b函数')
return 0
@b_1
def a_1():
print('我是a函数')
print(a_1)
# 输出
# 我是b函数
# 0
#
# Process finished with exit code 0