没有名为助手的模块

时间:2017-12-04 02:47:59

标签: python tensorflow

我在运行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)

Codes following

注意:助手不是助手

1 个答案:

答案 0 :(得分:1)

您正在寻找的ConstraintLayout模块是由您链接的教程的创建者创建的。

(它不是tensorflow包之一),您可以通过克隆整个GitHub repository或仅下载helpers.py来获取帮助程序模块。