0
$\begingroup$

Still feeling a bit new to the world of neural networks. I am working with a CNN model right now (working with Keras), and would like to train it to identify certain types of objects from a dataset. I have read through a number of walk-throughs and tutorials on the subject, but I am having conceptual issues in understanding the key component of what it means to set up your training and test data.

In many of the walk-throughs (cat or dog/mnst/etc.), there is always a portion in the keras tutorials where training data is downloaded from the datasets package, and part of that are the labels.

from keras.datasets import cifar10
(train_images, train_labels), (test_images, test_labels) = cifar10.load_data()

I understand in these examples, the labels are already applied. But at the risk of highlighting how much more I need to learn, how would this be done with real-world data? I have datasets of numerous images, but how does one provide labels to my training data? I thought this was unsupervised and as such, this wouldn't need to be done.

$\endgroup$
3
  • 1
    $\begingroup$ @Sycorax I think these are two entirely different questions. $\endgroup$ – Jan Kukacka Jun 27 '18 at 10:17
  • 1
    $\begingroup$ Not sure I understand the question: if your real-world data are unlabeled then you use an unsupervised algorithm. If you have your own images and you want to classify them, then you need to create a labeled training set - that is, by adding your own labels. $\endgroup$ – Robert Long Jun 28 '18 at 5:41
  • $\begingroup$ He might be looking for some unsupervised clustering, like that shown on slide 10 of this link. $\endgroup$ – EngrStudent Jun 28 '18 at 11:40
1
$\begingroup$

You provide labels for images by labeling the images.

Suppose you have a pet dog and a pet cat and a pet goldfish and you’ve taken lots of photos of each individually — that is, no photos contain a cat and a dog, or a dog and a goldfish.

Photos containing cats could be arbitrarily be labeled 0, dogs as 1, and goldfish as 2. Or any arbitrary scheme of this sort. Which animal gets what label is not important, so long as two animals don’t have the same label.

$\endgroup$
4
  • $\begingroup$ This may be where I go off the deep end, but how would unsupervised learning occur then? I thought that there would be a need to label data, however, in the case where my data volume grows...is it feasible to label each point in the training set still? $\endgroup$ – Rivers31334 Jun 27 '18 at 22:51
  • 1
    $\begingroup$ (1) Unsupervised learning doesn’t use labels. (2) labeling data is often an expensive and challenging step in any supervised machine learning enterprise. $\endgroup$ – Sycorax Jun 27 '18 at 23:01
  • $\begingroup$ Thanks again. This takes me back to my initial confusion. Why are all the tutorials that I use, provide labels to the test data if a CNN is unsupervised? $\endgroup$ – Rivers31334 Jun 27 '18 at 23:10
  • $\begingroup$ CNNs are neither inherently supervised nor inherently unsupervised. $\endgroup$ – Sycorax Jun 28 '18 at 0:27

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