我最近开始阅读Pytorch的实验,我看到转换模块有一个
Lambda
如果 python lambda 的工作方式相同,
那是单行函数!
例子:
def test(x): return x**2
等同于:
lambda x:x**2