0

I have 40 different images (1, ..40),( each one has 10 repetition " 40x10"),i should use one hot encoding for each image (the 40), for example image (1) the one hote encoding will be encoding will be: [ 1 0 0 0 0 0 0.....40(0)], for images 2 the one hot encoding will be : [ 0 1 0 0 0 0 0 ...40(0)], since each image has 10 repetition, for example; for the 10 images of 1 ( they are for same object but with slight difference among them), should I use same code vector for the 10 repetition!!

navin
  • 1
  • @SycoraxsaysReinstateMonica That's the same question by the same asker, but it was closed. – Tashus Dec 27 '19 at 20:55
  • 1
    @Tashus Yes, I'm aware. Re-posting the same question again is not how closure is remediated; instead, OP is supposed to edit the question into a suitable format. This is explained in the [help]. – Sycorax Dec 27 '19 at 21:00
  • @SycoraxsaysReinstateMonica I hope OP heeds that second comment. To your first, OP could simply respond, "No, that does not answer my question." XD – Tashus Dec 27 '19 at 21:19
  • 1
    @Tashus The comment "Does this answer your question? <link>" is automatically produced whenever a privileged user propose to close one question as a duplicate of <link>. – Sycorax Dec 27 '19 at 21:27

1 Answers1

0

Since every 10 image sample belong to the same class, we need to use the same one-hot-encoded label for each image in that class, for all 40 classes.

As an example, we need to use one-hot-encoded labels [1 0 0 0 .... (40)0] (of dimension 40x1) for every one of the 10 images in the 1st class. Similarly, one-hot-encoded labels [0 1 0 0 .... (40)0] for every one of the 10 images in the 2nd class and so on.

Balraj Ashwath
  • 711
  • 7
  • 9