Discussion:
network won't converge
Pierre-Luc Bacon
2007-05-03 04:18:56 UTC
Permalink
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?

calibration.data:
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Vincenzo Di Massa
2007-05-03 12:10:23 UTC
Permalink
Try to scale the patterns in the [0,1] range.

You can try out this small script: save it to a file "scale.py" and call it
like this:

python scale.py fann_data_file.data | tee dest_file_name.data

#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])

m=[[int(h.strip()) for h in f.next().split()],]
for l in f:
m.append([float(x) for x in l.split()])

max_val=0
f.close()
for l in m:
for i in l:
max_val=max(max_val,max(l))

print m[0]
for l in m[1:]:
for i in l:
print "%0.8f" % (i/max_val),
print ""

#####################SCRIPT END###################

Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Josh Menke
2007-05-03 12:23:46 UTC
Permalink
What kind of outputs are you getting?

What kind of output node transfer function are you using? Should be linear
for this type of thing, right?

--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and call it
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-------------------------------------------------------------------------
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
joshua.menke-***@public.gmane.org
Pierre-Luc Bacon
2007-05-03 14:40:51 UTC
Permalink
The network is fed with pixel coordinates (x,y) and the output is
expected to be the real position (in cm) of the object it the 3d field
(x and z). This is intented to be used for camera calibration.
Something like this:
http://ancr.crt.fr/Old/fichtech/vision/CalibrationNN/index.htm (this
is in french)

I've been only experimenting with sigmoid transfer function so far.
Post by Josh Menke
What kind of outputs are you getting?
What kind of output node transfer function are you using? Should be linear
for this type of thing, right?
--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and call
it
Post by Vincenzo Di Massa
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Adrian Spilca
2007-05-03 16:12:26 UTC
Permalink
As Josh suggested, try using FANN_LINEAR (rather than FANN_SIGMOID) for
the output layer. Reason: your problem is of the
_function_approximation_ type rather than _classification_.

Adrian
Post by Pierre-Luc Bacon
The network is fed with pixel coordinates (x,y) and the output is
expected to be the real position (in cm) of the object it the 3d field
(x and z). This is intented to be used for camera calibration.
http://ancr.crt.fr/Old/fichtech/vision/CalibrationNN/index.htm (this
is in french)
I've been only experimenting with sigmoid transfer function so far.
Post by Josh Menke
What kind of outputs are you getting?
What kind of output node transfer function are you using? Should be linear
for this type of thing, right?
--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and call
it
Post by Vincenzo Di Massa
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Josh Menke
2007-05-03 15:18:07 UTC
Permalink
Yes, the sigmoid transfer function can only output values between 0 and 1,
so you will never fit your function. You'll need to either map the values
into 0..1, or use a linear transfer function.

--Josh
Post by Adrian Spilca
As Josh suggested, try using FANN_LINEAR (rather than FANN_SIGMOID) for
the output layer. Reason: your problem is of the
_function_approximation_ type rather than _classification_.
Adrian
Post by Pierre-Luc Bacon
The network is fed with pixel coordinates (x,y) and the output is
expected to be the real position (in cm) of the object it the 3d field
(x and z). This is intented to be used for camera calibration.
http://ancr.crt.fr/Old/fichtech/vision/CalibrationNN/index.htm (this
is in french)
I've been only experimenting with sigmoid transfer function so far.
Post by Josh Menke
What kind of outputs are you getting?
What kind of output node transfer function are you using? Should be
linear
Post by Pierre-Luc Bacon
Post by Josh Menke
for this type of thing, right?
--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and
call
Post by Pierre-Luc Bacon
Post by Josh Menke
it
Post by Vincenzo Di Massa
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
Post by Vincenzo Di Massa
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
joshua.menke-***@public.gmane.org
Vincenzo Di Massa
2007-05-03 15:38:37 UTC
Permalink
Also the hidden units need to be linear if you use such big inputs...
Guesst what is the value of the sigmoid derivative when the sum is 70... 0!
So the gradient descend will not work!

Regards
Vincenzo
Post by Josh Menke
Yes, the sigmoid transfer function can only output values between 0 and 1,
so you will never fit your function. You'll need to either map the values
into 0..1, or use a linear transfer function.
--Josh
Post by Adrian Spilca
As Josh suggested, try using FANN_LINEAR (rather than FANN_SIGMOID) for
the output layer. Reason: your problem is of the
_function_approximation_ type rather than _classification_.
Adrian
Post by Pierre-Luc Bacon
The network is fed with pixel coordinates (x,y) and the output is
expected to be the real position (in cm) of the object it the 3d field
(x and z). This is intented to be used for camera calibration.
http://ancr.crt.fr/Old/fichtech/vision/CalibrationNN/index.htm (this
is in french)
I've been only experimenting with sigmoid transfer function so far.
Post by Josh Menke
What kind of outputs are you getting?
What kind of output node transfer function are you using? Should be
linear
Post by Pierre-Luc Bacon
Post by Josh Menke
for this type of thing, right?
--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and
call
Post by Pierre-Luc Bacon
Post by Josh Menke
it
Post by Vincenzo Di Massa
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-----------------------------------------------------------------------
--
Post by Vincenzo Di Massa
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-----------------------------------------------------------------------
--
Post by Vincenzo Di Massa
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
-----------------------------------------------------------------------
-- This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
------------------------------------------------------------------------
- This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Pierre-Luc Bacon
2007-05-03 22:43:55 UTC
Permalink
It now works and converges after 500 000 epochs with desired error set
to 0.0001.
I changed the transfer function from SIGMOID_SYMMETRIC to SIGMOID
only. I also used fann_scale_train_data to scale layers in the [0,1]
range.

I use fann_descale_input() and fann_descale_output() in the execution
program but it fails to return the values in the right range...
there's no difference with or without.
So I can't tell if it completely works as expected...

Here's the code:
http://pierreluc.aqra.ca/train.c
http://pierreluc.aqra.ca/map.c
http://pierreluc.aqra.ca/calibration.data

PS
I haven't tried LINEAR transfer function since the program has to run
in fixed point...
Post by Vincenzo Di Massa
Also the hidden units need to be linear if you use such big inputs...
Guesst what is the value of the sigmoid derivative when the sum is 70... 0!
So the gradient descend will not work!
Regards
Vincenzo
Post by Josh Menke
Yes, the sigmoid transfer function can only output values between 0 and 1,
so you will never fit your function. You'll need to either map the values
into 0..1, or use a linear transfer function.
--Josh
Post by Adrian Spilca
As Josh suggested, try using FANN_LINEAR (rather than FANN_SIGMOID) for
the output layer. Reason: your problem is of the
_function_approximation_ type rather than _classification_.
Adrian
Post by Pierre-Luc Bacon
The network is fed with pixel coordinates (x,y) and the output is
expected to be the real position (in cm) of the object it the 3d field
(x and z). This is intented to be used for camera calibration.
http://ancr.crt.fr/Old/fichtech/vision/CalibrationNN/index.htm (this
is in french)
I've been only experimenting with sigmoid transfer function so far.
Post by Josh Menke
What kind of outputs are you getting?
What kind of output node transfer function are you using? Should be
linear
Post by Pierre-Luc Bacon
Post by Josh Menke
for this type of thing, right?
--Josh
Post by Vincenzo Di Massa
Try to scale the patterns in the [0,1] range.
You can try out this small script: save it to a file "scale.py" and
call
Post by Pierre-Luc Bacon
Post by Josh Menke
it
Post by Vincenzo Di Massa
python scale.py fann_data_file.data | tee dest_file_name.data
#####################SCRIPT BEGIN#################
#/usr/bin/python
import sys
f=open(sys.argv[1])
m=[[int(h.strip()) for h in f.next().split()],]
m.append([float(x) for x in l.split()])
max_val=0
f.close()
max_val=max(max_val,max(l))
print m[0]
print "%0.8f" % (i/max_val),
print ""
#####################SCRIPT END###################
Vincenzo
Post by Pierre-Luc Bacon
I would need the network to map some data (pixel to cm) using the
following training file. I won't converge even after 10000000 epochs
(MSE stops changing after a few epochs only). Scaling the input and
output in [0,10] or [0,1] doesn't give a better result. Any tips to
make the network learn these data ?
33 2 2
30 38
0 200
70 38
20 200
108 38
40 200
150 39
60 200
191 38
80 200
21 48
0 180
65 49
20 180
108 48
40 180
156 49
60 180
200 49
80 180
12 60
0 160
59 60
20 160
108 60
40 160
161 60
60 160
211 60
80 160
2 76
0 140
54 75
20 140
110 75
40 140
167 76
60 140
225 75
80 140
47 95
20 120
110 95
40 120
176 96
60 120
237 94
80 120
37 122
20 100
111 121
40 100
188 122
60 100
23 158
20 80
112 159
40 80
203 159
60 80
2 214
20 60
114 216
40 60
229 217
60 60
-----------------------------------------------------------------------
--
Post by Vincenzo Di Massa
Post by Pierre-Luc Bacon
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-----------------------------------------------------------------------
--
Post by Vincenzo Di Massa
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
--
Joshua Menke, Ph.D.
Machine Learning Scientist
Dev Group
Hi-Rez Studios
-----------------------------------------------------------------------
-- This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
------------------------------------------------------------------------
- This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Fann-general mailing list
https://lists.sourceforge.net/lists/listinfo/fann-general
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Continue reading on narkive:
Loading...