对。就是这个。。在这里又转头调用另外一个具体的实现去了。
pytorch 的具体运算环境可能是 CPU 也可以是 GPU,也可以是分布式,背后会有不同的引擎。所以这部分代码肯定就复杂了。你再继续看会跳到更多的代码去。
但仅就 python 的语法而言,就是这么简单。
【 在 feng321 的大作中提到: 】
: __call__ : Callable[..., Any] = _wrapped_call_impl 是什么意思?
: def _wrapped_call_impl(self, *args, **kwargs):
: if self._compiled_call_impl is not None:
: ...................
--
FROM 110.81.1.*