2

我正在尝试使用 OPF 运行 TemporalClassification 模型来识别流中的模式。我调整了模型参数,使其具有两个传感器输入:ScalarEncoder 和 SDRCategoryEncoder。后者标记为classifierOnly。并且在推论中它也被设置为 predictField 。

当尝试用输入数据输入模型时,我得到

RuntimeError: getOutputData unknown output 'categoriesOut' on region Classifier.

NontemporalClassification(仅更改了 inferenceType)模型运行时没有此类错误。

我在 nupic 代码中发现了 6 次 categoryOut:https ://github.com/numenta/nupic/search?utf8=%E2%9C%93&q=categoriesOut

并且错误出现在 nupic/frameworks/opf/clamodel.py 的第 558 行

classificationDist = classifier.getOutputData('categoriesOut')

似乎网络中的 ClassifierRegion 没有正确准备好输出数据。

谁能解释为什么分类区域没有“categoriesOut”?我猜我的模型参数中存在错误配置,但在模型初始化期间没有错误或警告。运行 TemporalClassification 模型是否需要任何强制参数和分配(NUPIC 文档中注意到的除外)?

4

1 回答 1

1

NuPIC 中有几种类型的 ClassifierRegions。您可以在 nupic/regions 文件夹中找到它们。我检查了来源,发现“categoriesOut”在 KNNClassifierRegion 的输出字典中

https://github.com/numenta/nupic/blob/469f6372082e95dd5d2a96181b745ba36d2e7a8a/nupic/regions/KNNClassifierRegion.py

outputs=dict(
categoriesOut=dict(
description='A vector representing, for each category '
'index, the likelihood that the input to the node belongs '
'to that category based on the number of neighbors of '
'that category that are among the nearest K.',
dataType='Real32',
count=0,
regionLevel=True,
isDefaultOutput=True),

确保在配置 TemporalClassification 模型时使用KNNClassifierRegion 。NontemporalClassification 的样本使用 CLAClassifier,但 CLAClassifierRegion 在其输出中没有 categoriesOut 并且如果您保留问题中描述的错误,则会出现

'regionName' : 'CLAClassifierRegion'

用于时间分类模型。

于 2014-10-01T17:32:23.103 回答