Answers.Body: <p>This itself isn't really an expression but a description of what <span class="math-container">$x_p$</span> looks like. Specifically, <span class="math-container">$x_p$</span> is a real-valued vector with the shape <code>[N, P^2 * C]</code>. Of course, that data comes from your dataset, but as an example</p>
  <pre><code>torch.ones(N, P^2 * C, dtype=torch.float32)
  
  # an example output for values N=2, P=2, C=1
  &gt;&gt;&gt; [[1., 1., 1., 1.],
       [1., 1., 1., 1.]]
  </code></pre>
  <p>will give you a vector with the desired shape. Note that this will be a <code>float32</code> vector, which makes it real-valued (<span class="math-container">$x_p \in R$</span>).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-22T08:22:07.193Z
Answers.LastActivityDate: 2022-06-22T08:22:07.193Z
Answers.UserDisplayName: Chillston
Body: <p>I was going through this VIT paper, what will it look like in torch , if we are trying to write this expression.</p>
  <p><a href="https://i.sstatic.net/QZkQD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QZkQD.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-22T07:11:40.297Z
Comments.Text: This itself isn't really an expression but a description of what $x_p$ looks like. Specifically, $x_p$ is a real-valued vector with the shape `[N, P^2 * C]`.
  Of course, that data comes from your dataset, but as an example `torch.ones(N, P^2 * C, dtype=torch.float32)` will give you a vector with the same shape. Note that this will be a float32 vector, which makes it real-valued ($x_p \in \mathbb{R}$).
Comments.UserDisplayName: Chillston
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-22T08:15:10.613Z
Comments.Text: @Chillston You could write that as an answer instead of a comment.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-22T08:22:33.833Z
Comments.Text: Of course, sorry
Comments.UserDisplayName: Chillston
Tags: <deep-learning><papers><math><notation><vision-transformer>
Title: What do we mean by the notation $\mathbf{x}_{p} \in \mathbb{R}^{N \times\left(P^{2} \cdot C\right)}$?
UserDisplayName: TheExorcist
ThreadText: # What do we mean by the notation $\mathbf{x}_{p} \in \mathbb{R}^{N \times\left(P^{2} \cdot C\right)}$?
  
  (Asked by: username_0 on 2022-06-22)
  
  I was going through this VIT paper, what will it look like in torch , if we are trying to write this expression.
  
  [![enter image description here](https://i.sstatic.net/QZkQD.png)](https://i.sstatic.net/QZkQD.png)
  
  **Tags:** deep-learning, papers, math, notation, vision-transformer
  
  > **Comments:**
  > **username_1**: This itself isn't really an expression but a description of what $x_p$ looks like. Specifically, $x_p$ is a real-valued vector with the shape `[N, P^2 * C]`. Of course, that data comes from your dataset, but as an example `torch.ones(N, P^2 * C, dtype=torch.float32)` will give you a vector with the same shape. Note that this will be a float32 vector, which makes it real-valued ($x_p \in \mathbb{R}$).  
  > **username_2**: @username_1 You could write that as an answer instead of a comment.  
  > **username_1**: Of course, sorry  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-06-22. Score: 2
  
  This itself isn't really an expression but a description of what $x\_p$ looks like. Specifically, $x\_p$ is a real-valued vector with the shape `[N, P^2 * C]`. Of course, that data comes from your dataset, but as an example
  
  ```
  torch.ones(N, P^2 * C, dtype=torch.float32)
  
  # an example output for values N=2, P=2, C=1
  >>> [[1., 1., 1., 1.],
       [1., 1., 1., 1.]]
  
  ```
  
  will give you a vector with the desired shape. Note that this will be a `float32` vector, which makes it real-valued ($x\_p \in R$).
  
  
  ---
  
  