Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train #9

Open
geraldstanje opened this issue Jul 15, 2014 · 1 comment
Open

Train #9

geraldstanje opened this issue Jul 15, 2014 · 1 comment

Comments

@geraldstanje
Copy link

Hello,

i dont want to read the training set from the file! i tried to manually train it using ann.Train, but the MSE does not go below 0.25. any idea why?
const numLayers = 3
const desiredError = 0.00001
const maxEpochs = 500000
const epochsBetweenReports = 1000

ann := fann.CreateStandard(numLayers, []uint32{2, 3, 1})
ann.SetActivationFunctionHidden(fann.SIGMOID_SYMMETRIC)
ann.SetActivationFunctionOutput(fann.SIGMOID_SYMMETRIC)

trainInput := [][]fann.FannType{{-1.0, -1.0}, {-1.0, 1.0}, {1.0, -1.0}, {1.0, 1.0}}
trainOutput := [][]fann.FannType{{-1.0}, {1.0}, {1.0}, {-1.0}}

for i := 1; i <= maxEpochs; i++ {
ann.ResetMSE()

for i, _ := range trainInput {
  ann.Train(trainInput[i], trainOutput[i])
}

if ann.GetMSE() < desiredError {
  break
}

}

how can you fix that? could you please provide an example (maybe using TrainOnData)?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@geraldstanje and others