data file input

G

GB

Help needed: in the C++ code of Backprapagation I am using data in the
way shwon below.
I need to change the program, so that it reads same data (actually I
need to put more complex data, for 64 inputs and 5 outputs; that is why
I need this change - too bulky to use in the code) but for the input
data file.
The question is - what exactly code going to accomplish that and how do
I organise the data file.
Thanking in advance
GB
======================
// read in the data
void initData(void)
{
printf("initialising data\n");
// the data here is the XOR data
// it has been rescaled to the range
// [-1][1]
// an extra input valued 1 is also added
// to act as the bias
// the output must lie in the range -1 to 1

trainInputs[0][0] = 1;
trainInputs[0][1] = -1;
trainInputs[0][2] = 1; //bias
trainOutput[0] = 1;

trainInputs[1][0] = -1;
trainInputs[1][1] = 1;
trainInputs[1][2] = 1; //bias
trainOutput[1] = 1;

trainInputs[2][0] = 1;
trainInputs[2][1] = 1;
trainInputs[2][2] = 1; //bias
trainOutput[2] = -1;

trainInputs[3][0] = -1;
trainInputs[3][1] = -1;
trainInputs[3][2] = 1; //bias
trainOutput[3] = -1;

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top