我在运行this tutorial时尝试导入助手 。但是,这报告了一个错误:ImportError:没有名为helpers的模块。我在pypi找不到合适的包装。我如何获得第三方包裹?
以下是教程片段
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)
注意:助手不是助手
答案 0 :(得分:1)
您正在寻找的ConstraintLayout
模块是由您链接的教程的创建者创建的。
(它不是tensorflow包之一),您可以通过克隆整个GitHub repository或仅下载helpers.py
来获取帮助程序模块。