1
$\begingroup$

Suppose I have a dataset of photos of people's faces. One face per image. What does the output vector for a single sample look like, and how do I train the network if I want it to:

  • predict the age (in days) of the person in the image

  • classify the person's gender

  • classify country of origin (say, out of only 7 possible options)

  • predict (x,y) coordinates of person's nose within the picture (where each coordinate is a value between 0-1, indicating percentage of the distance from top left corner of the input image)

$\endgroup$
1
$\begingroup$

This is a strange question. "What does the output vector for a single sample look like?", well, you write the model, so you decide how you chooses to code "the output", which I take to mean $Y$, the response variable that you want to predict. So for your examples:

  1. predict the age (in days) of the person in the image. Output is one number, the age (what else?). But see Convolutional Neural Network Scale Sensitivity
  2. classify the person's gender: Most people still think that gender is binary, so 0/1 coding should do. If in Canada, maybe more complicated ...
  3. classify country of origin (say, out of only 7 possible options): This is a categorical response, so you could use a dummy encoding.
  4. predict (x,y) coordinates of person's nose within the picture (where each coordinate is a value between 0-1, indicating percentage of the distance from top left corner of the input image): Just encode $(x,y)$ in the obvious way, as a pair

If I have misunderstood the question, just explain better.

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Thanks for the response. I have done more research and practiced in this since asking the question, and your answer is the same conclusion I have arrived at. $\endgroup$ – rodrigo-silveira Aug 14 '18 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.