torch.mean()的源代码的位置 [英] The location of source code for torch.mean()
问题描述
我正在尝试找到torch.mean的源代码,并且无法在pytorch github中找到它.它正在数学运算中,但我根本找不到它
I'm trying to find the source code for torch.mean and am unable to find it in the pytorch github. It is under math operations but I can't find it at all.
我到处都看过,检查了pytorch/torch下的大多数页面,但仍然找不到它.
I've looked everywhere and inspected most pages under pytorch/torch and am still unable to find it.
我什至做到了?在jupyter笔记本中,但它只是返回了无用的文档字符串
I even did ?? in a jupyter notebook but it just returned a useless docstring
推荐答案
由于操作组件是用C ++编写的,因此不能通过??等操作来调用它们.或"__file__"或"getsourcefile"类型的操作.
Since operations components are written in C++, they are not callable with operations such as ?? or "__file__" or "getsourcefile" type of operations.
文件似乎是用C ++编写的:
The files appear to be here, written in C++:
https://github.com/pytorch/pytorch/blob/master/caffe2/operators/mean_op.cc https://github.com/pytorch/pytorch/blob/master/caffe2/operators/mean_op.h
这篇关于torch.mean()的源代码的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!