【发布时间】:2018-11-13 15:19:59
【问题描述】:
作为标题,我的数据如下所示:
["test", "bob", "romeo"] - 等等只是随机词
我已经根据单词中每个字母在字母表中的位置将它们转换为数字,所以现在应该是:
[[19, 4, 18, 19], [1, 14, 1], [17, 14, 12, 4, 14]]
现在我想对其进行热编码
tf.one_hot(featuresVectors, longestWordLen)
结果
ResourceExhaustedError: OOM when allocating tensor with shape[512996,62,62]
【问题讨论】:
标签: python tensorflow one-hot-encoding