129 SIZE_CHECK(m_bias.empty() || m_decisionFunction.outputShape().numElements() == m_bias.size());
130 ModelBatchOutputType modelResult;
131 m_decisionFunction.eval(input,modelResult);
132 std::size_t
batchSize = modelResult.size1();
134 if(modelResult.size2()== 1){
135 double bias = m_bias.empty()? 0.0 : m_bias(0);
136 for(std::size_t i = 0; i !=
batchSize; ++i){
137 output(i) = modelResult(i,0) +
bias > 0.0;
141 for(std::size_t i = 0; i !=
batchSize; ++i){
143 output(i) =
static_cast<unsigned int>(arg_max(row(modelResult,i)));
145 output(i) =
static_cast<unsigned int>(arg_max(row(modelResult,i) + m_bias));
154 SIZE_CHECK(m_bias.empty() || m_decisionFunction.outputShape().numElements() == m_bias.size());
155 typename Model::OutputType modelResult;
156 m_decisionFunction.eval(pattern,modelResult);
158 if(modelResult.size() == 1){
159 double bias = m_bias.empty()? 0.0 : m_bias(0);
160 output = modelResult(0) +
bias > 0.0;
164 output =
static_cast<unsigned int>(arg_max(modelResult));
166 output =
static_cast<unsigned int>(arg_max(modelResult + m_bias));