std::vector<float>hot_label(2);// hard coded the number of classes
hot_label[XB[i]->values[dim]]=1;
hot_label[1-XB[i]->values[dim]]=0;
ytrue.push_back(hot_label);
}
for(intj=network.size()-1;j>=0;j--)
{
vector<vector<float>>new_output_layer=backpropagate_layer(network[j],ytrue);//todo remove the record from this method and replace it with the previous input resulting from the forward
ytrue=new_output_layer;
}
}
voidNN::train()//
{
{
intcounter=0;
intcounter=0;// use the backprpagation function here