I am training a neural network to recognize image of a fruit(apple). I have taken 120 images of size 8x8 of which 40 are positive and remaining are negative. So my input is 64x120 and my target vector is 1x120. But what will be the values in my target vector? How do i assign it? Previously, i have assigned target = 1x120 matrix (first 40 column = 1 and last 80 column = 0) as the first 40 are positive images. Is this correct?
Asked
Active
Viewed 232 times
1 Answers
0
The input should be for a single image, so a 64 vector, and the output should be a yes no value, so a scalar (vector of 1 element) with a value of 1 for positive, and 0 for negative.
Other values may be used, depending on your network layers. For example +1,-1 or 0.95,0.05

Photon
- 3,182
- 1
- 15
- 16
-
would a classifier with 2 outputs perform the same on the task? – Finn Aug 18 '16 at 09:14
-
Yes. It's basically a function that you optimize. The result should be the same. – Photon Aug 18 '16 at 09:15