Body: <p>Consider the following paragraphs from the introduction of the chapter named <a href="https://d2l.ai/chapter_recurrent-neural-networks/index.html" rel="nofollow noreferrer">Recurrent Neural Networks</a> from the textbook titled <a href="https://d2l.ai/" rel="nofollow noreferrer">Dive into Deep Learning</a></p>
  <blockquote>
  <p>So far we encountered two types of data: tabular data and image data.
  For the latter we designed specialized layers to take advantage of the
  regularity in them. In other words, if we were to <strong>permute the pixels
  in an image</strong>, it would be much more difficult to reason about its
  content of something that would look much like the background of a
  test pattern in the times of analog TV.</p>
  <p>Most importantly, so far we tacitly assumed that our data are all
  drawn from some distribution, and all the <strong>examples are independently
  and identically distributed (i.i.d.)</strong>. Unfortunately, this is not true
  for most data. For instance, the <strong>words in this paragraph</strong> are written
  in sequence, and it would be quite difficult to decipher its meaning
  if they were permuted randomly. Likewise, <strong>image frames in a video</strong>, the
  audio signal in a conversation, and the browsing behavior on a
  website, all follow sequential order. It is thus reasonable to assume
  that specialized models for such data will do better at describing
  them.</p>
  </blockquote>
  <p>In neural networks, we generally use words: <strong>instances</strong>, examples, data points to refer to a particular row of a dataset. In general, in the case of CNN, an instance will be an image, and in the case of RNN, an instance will be a sequence of text (maybe a sentence, paragraph, or text).</p>
  <p>Every instance contains features: in image data, pixels are generally treated as features and in the case of text data, either characters or words are generally treated as features.</p>
  <p>With this context, let me explain my doubt</p>
  <p>I have an issue understanding the paragraphs. The issue is the comparison of examples/instances of image data with features of text data. Pixels can be compared to words/characters and images can be compared to sentences or words or paragraphs or text documents based on the context.</p>
  <p>In the second paragraph, it is said that the examples (images) are i.i.d. But then the images are compared with words in a paragraph, but words are features, not examples. As the paragraph is not saying that pixels are i.i.d., how can the words in paragraphs be used for comparison?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-09T09:48:21.997Z
Comments.Text: I am not sure I understand your question. I understand it has to do with images, words, sentences, being iid or not, and to compare words with images, but I don't understand what the specific question is. I don't understand this "As the paragraph is not saying that pixels are i.i.d. how can the words in paragraphs be used for comparison?". I mean, why do you need both the pixels and the words to be iid to compare them? If pixels and words are features, then you can compare them, in the sense that you can say that both are features. What do you mean by "compare"?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-09T11:52:33.087Z
Comments.Text: @nbro in the second paragraph, they told that examples are iid (w.r.t image data). But they are talking about the words in paragraphs. How to reconcile?
Comments.UserDisplayName: hanugm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-09T11:55:34.903Z
Comments.Text: @nbro If they say pixels are iid then they can compare with words. But they are saying images are iid then how can they compare with words instead of paragraphs?
Comments.UserDisplayName: hanugm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T09:15:04.420Z
Comments.Text: It seems to me you think that words are "features" and that we can't compare words with images because images are "samples" and not features. Is this your question? I would recommend that you edit your post to remove unnecessary details and just leave specific question that highlights your doubt/problem.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T09:32:23.400Z
Comments.Text: @nbro Yeah exactly.
Comments.UserDisplayName: hanugm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T09:47:32.407Z
Comments.Text: Thanks. I've rewritten the title to make it clearer what the problem is. Make sure that's your question. Feel free to edit again your problem to improve it ;)
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T09:56:32.333Z
Comments.Text: Thanks @nbro After you decreased activity, I also decreased involuntarily :(
Comments.UserDisplayName: hanugm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T12:18:05.530Z
Comments.Text: It's fine. We're all volunteers here, so we're not forced to be here. Nobody will pay you for being here. We're here because we believe in or like this community. I needed this break from AISE and to lower my activity here for a while. When you're a mod, people will attack you only because you're a mod and because you take a decision that is not consistent with their expectations. I don't want to deal with toxic users. That made my life worse and more stressful. I can avoid this stress!
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-10T12:18:07.370Z
Comments.Text: _For now_, I prefer to be a regular user and help whenever I can (especially, edits, clarifications and answer questions that can be answered quickly), without having to deal with problematic users. I think that every small contribution can be helpful. Voting, edits, commenting, asking and answering questions or reviewing the queues. You don't have to do everything. If we're about 10 active users every day (and they don't always have to be the same), and everyone does a little, the community should be able to self-maintain, assuming that our general activity doesn't increase much.
Comments.UserDisplayName: nbro
Tags: <convolutional-neural-networks><recurrent-neural-networks><books><features><iid>
Title: Does it make sense to compare images (samples) with words (features)?
UserDisplayName: hanugm
ThreadText: # Does it make sense to compare images (samples) with words (features)?
  
  (Asked by: username_0 on 2022-03-09)
  
  Consider the following paragraphs from the introduction of the chapter named [Recurrent Neural Networks](https://d2l.ai/chapter_recurrent-neural-networks/index.html) from the textbook titled [Dive into Deep Learning](https://d2l.ai/)
  
  > So far we encountered two types of data: tabular data and image data.
  > For the latter we designed specialized layers to take advantage of the
  > regularity in them. In other words, if we were to **permute the pixels
  > in an image**, it would be much more difficult to reason about its
  > content of something that would look much like the background of a
  > test pattern in the times of analog TV.
  >
  > Most importantly, so far we tacitly assumed that our data are all
  > drawn from some distribution, and all the **examples are independently
  > and identically distributed (i.i.d.)**. Unfortunately, this is not true
  > for most data. For instance, the **words in this paragraph** are written
  > in sequence, and it would be quite difficult to decipher its meaning
  > if they were permuted randomly. Likewise, **image frames in a video**, the
  > audio signal in a conversation, and the browsing behavior on a
  > website, all follow sequential order. It is thus reasonable to assume
  > that specialized models for such data will do better at describing
  > them.
  
  In neural networks, we generally use words: **instances**, examples, data points to refer to a particular row of a dataset. In general, in the case of CNN, an instance will be an image, and in the case of RNN, an instance will be a sequence of text (maybe a sentence, paragraph, or text).
  
  Every instance contains features: in image data, pixels are generally treated as features and in the case of text data, either characters or words are generally treated as features.
  
  With this context, let me explain my doubt
  
  I have an issue understanding the paragraphs. The issue is the comparison of examples/instances of image data with features of text data. Pixels can be compared to words/characters and images can be compared to sentences or words or paragraphs or text documents based on the context.
  
  In the second paragraph, it is said that the examples (images) are i.i.d. But then the images are compared with words in a paragraph, but words are features, not examples. As the paragraph is not saying that pixels are i.i.d., how can the words in paragraphs be used for comparison?
  
  **Tags:** convolutional-neural-networks, recurrent-neural-networks, books, features, iid
  
  > **Comments:**
  > **username_1**: I am not sure I understand your question. I understand it has to do with images, words, sentences, being iid or not, and to compare words with images, but I don't understand what the specific question is. I don't understand this "As the paragraph is not saying that pixels are i.i.d. how can the words in paragraphs be used for comparison?". I mean, why do you need both the pixels and the words to be iid to compare them? If pixels and words are features, then you can compare them, in the sense that you can say that both are features. What do you mean by "compare"?  
  > **username_0**: @username_1 in the second paragraph, they told that examples are iid (w.r.t image data). But they are talking about the words in paragraphs. How to reconcile?  
  > **username_0**: @username_1 If they say pixels are iid then they can compare with words. But they are saying images are iid then how can they compare with words instead of paragraphs?  
  > **username_1**: It seems to me you think that words are "features" and that we can't compare words with images because images are "samples" and not features. Is this your question? I would recommend that you edit your post to remove unnecessary details and just leave specific question that highlights your doubt/problem.  
  > **username_0**: @username_1 Yeah exactly.  
  > **username_1**: Thanks. I've rewritten the title to make it clearer what the problem is. Make sure that's your question. Feel free to edit again your problem to improve it ;)  
  > **username_0**: Thanks @username_1 After you decreased activity, I also decreased involuntarily :(  
  > **username_1**: It's fine. We're all volunteers here, so we're not forced to be here. Nobody will pay you for being here. We're here because we believe in or like this community. I needed this break from AISE and to lower my activity here for a while. When you're a mod, people will attack you only because you're a mod and because you take a decision that is not consistent with their expectations. I don't want to deal with toxic users. That made my life worse and more stressful. I can avoid this stress!  
  > **username_1**: _For now_, I prefer to be a regular user and help whenever I can (especially, edits, clarifications and answer questions that can be answered quickly), without having to deal with problematic users. I think that every small contribution can be helpful. Voting, edits, commenting, asking and answering questions or reviewing the queues. You don't have to do everything. If we're about 10 active users every day (and they don't always have to be the same), and everyone does a little, the community should be able to self-maintain, assuming that our general activity doesn't increase much.  
  
  ---
  
  ## 0 answers
  
  