diff --git a/openbr/plugins/nn.cpp b/openbr/plugins/nn.cpp index 430e3ad..91d93a8 100644 --- a/openbr/plugins/nn.cpp +++ b/openbr/plugins/nn.cpp @@ -59,20 +59,18 @@ class MLPTransform : public MetaTransform BR_PROPERTY(QStringList, inputVariables, QStringList()) Q_PROPERTY(QStringList outputVariables READ get_outputVariables WRITE set_outputVariables RESET reset_outputVariables STORED false) BR_PROPERTY(QStringList, outputVariables, QStringList()) - Q_PROPERTY(int hiddenLayers READ get_hiddenLayers WRITE set_hiddenLayers RESET reset_hiddenLayers STORED false) - BR_PROPERTY(int, hiddenLayers, 1) Q_PROPERTY(QList neuronsPerLayer READ get_neuronsPerLayer WRITE set_neuronsPerLayer RESET reset_neuronsPerLayer STORED false) - BR_PROPERTY(QList, neuronsPerLayer, QList() << 6) + BR_PROPERTY(QList, neuronsPerLayer, QList() << 1 << 1) CvANN_MLP mlp; void init() { - Mat layers = Mat(hiddenLayers, 1, CV_32SC1); - for (int i=0; i(data, inputVariables.at(i))); mlp.train(_data,labels,Mat()); + + if (Globals->verbose) + for (int i=0; i(i,0)); + // Apparently mlp.predict reshapes the response matrix? + for (int i=0; i(0,i)); } void load(QDataStream &stream)