from cs231n.fast_layers import conv_forward_fast, conv_backward_fast
out_fast, cache_fast = conv_forward_fast(x, w, b, conv_param)
如何通过命令找到conv_forward_fast
函数的位置?如何知道从库中导入的python函数的位置
from cs231n.fast_layers import conv_forward_fast, conv_backward_fast
out_fast, cache_fast = conv_forward_fast(x, w, b, conv_param)
如何通过命令找到conv_forward_fast
函数的位置?如何知道从库中导入的python函数的位置
你可以只
import cs231n.fast_layers as path
print(path)
,它会告诉你该库的路径。
那么它给的内存位置,但我想要的是找到的位置,它在哪里实际上来自于。 –
@GayalShamane我改变了我的回答有点 – Aaron
导入错误回溯(最近通话最后一个)
在Python 2.x中:
from os.path import join
path_to_module = __import__(join.__module__).__file__
你的意思是它属于什么模块?或者它在你的代码中? – mrstebo
它属于哪个模块。以及模块位于何处。 –
我认为这可能是一些帮助,http://stackoverflow.com/questions/7027848/getting-corresponding-module-from-function – mrstebo