我用 DL4J 训练了一个 Mnist 模型。当我在推理模式下使用这个模型时:
INDArray prediction = myModel.output(myINDArrayImage);
这给了我一个预测INDArray,它工作正常。它的大小INDArray等于我OutputLayer模型上的输出数量。
有没有办法将预测限制为字符库?即是这样的:
INDArray prediction = myModel.output(myINDArrayImage, charactersPossible);
charactersPossible可能的输出索引列表在哪里?