没有名为helpers的模块

2024-05-16 21:51:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在运行this tutorial时导入帮助程序 . 但是,这报告了一个错误:ImportError:没有名为helpers的模块。我在派皮找不到合适的包裹。我怎样才能拿到第三方的包裹?

以下是教程片段

In [1]:
x = [[5, 7, 8], [6, 3], [3], [1]]
While manipulating such variable-length lists are convenient to humans, RNNs prefer a different layout:
In [2]:
import helpers
xt, xlen = helpers.batch(x)
In [3]:
x
Out[3]:
[[5, 7, 8], [6, 3], [3], [1]]
In [4]:
xt
Out[4]:
array([[5, 6, 3, 1],
       [7, 3, 0, 0],
       [8, 0, 0, 0]], dtype=int32)

Codes following

注意:助手不是助手


Tags: 模块in程序报告错误助手教程out