Learn Forward and backward matrix transformation for an n-dim feature space

jpainam: <p>Hi!<br>
According to <a href="https://www.youtube.com/watch?v=sdCmW5N1LW4" rel="noopener nofollow ugc">this</a> and <a href="https://www.youtube.com/watch?v=ipRrCPvftTk&amp;index=4&amp;list=PLJHszsWbB6hrkmmq57lX8BV-o-YIOFsiG" rel="noopener nofollow ugc">this</a>, backward and forward transformations are tensor/matrices that learn move back and forth between different coordinate system. This simply means, given two vector space, it’s possible to:</p>
<ol>
<li>Build a vector for the new basis from the old basis using backward (B) transformation matrix</li>
<li>Build a vector for the old basis from the new basis using Forward (F)  transformation matrix</li>
</ol>
<p>With the product of F.B = Identity matrix. also B = Inv(F)<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/1/17b6f8be988c557c4e0b090e185a1ce8032f08e3.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/17b6f8be988c557c4e0b090e185a1ce8032f08e3" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/2X/1/17b6f8be988c557c4e0b090e185a1ce8032f08e3_2_690x348.jpeg" alt="image" data-base62-sha1="3nMZNF0WEIGFOx15NLNYVYwgqC7" width="690" height="348" srcset="https://discuss.pytorch.org/uploads/default/optimized/2X/1/17b6f8be988c557c4e0b090e185a1ce8032f08e3_2_690x348.jpeg, https://discuss.pytorch.org/uploads/default/optimized/2X/1/17b6f8be988c557c4e0b090e185a1ce8032f08e3_2_1035x522.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/2X/1/17b6f8be988c557c4e0b090e185a1ce8032f08e3.jpeg 2x" data-dominant-color="FAF7F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1221×617 89.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/5/58f7ac77e92eb63ca12c1463202f869691608d38.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/58f7ac77e92eb63ca12c1463202f869691608d38" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/2X/5/58f7ac77e92eb63ca12c1463202f869691608d38_2_690x374.jpeg" alt="image" data-base62-sha1="cH2EF8SUv0nNE9duyX8MGuYclEk" width="690" height="374" srcset="https://discuss.pytorch.org/uploads/default/optimized/2X/5/58f7ac77e92eb63ca12c1463202f869691608d38_2_690x374.jpeg, https://discuss.pytorch.org/uploads/default/optimized/2X/5/58f7ac77e92eb63ca12c1463202f869691608d38_2_1035x561.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/2X/5/58f7ac77e92eb63ca12c1463202f869691608d38.jpeg 2x" data-dominant-color="FAF8F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1191×647 84.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/3/3e872fb7f792b393b779dea0af57e2ef90c1e103.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/3e872fb7f792b393b779dea0af57e2ef90c1e103" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/2X/3/3e872fb7f792b393b779dea0af57e2ef90c1e103_2_690x323.jpeg" alt="image" data-base62-sha1="8V9eNxUXEO1yDtBtoZvwJ1mrOiT" width="690" height="323" srcset="https://discuss.pytorch.org/uploads/default/optimized/2X/3/3e872fb7f792b393b779dea0af57e2ef90c1e103_2_690x323.jpeg, https://discuss.pytorch.org/uploads/default/optimized/2X/3/3e872fb7f792b393b779dea0af57e2ef90c1e103_2_1035x484.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/2X/3/3e872fb7f792b393b779dea0af57e2ef90c1e103.jpeg 2x" data-dominant-color="F8F6F7"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1264×593 83.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
The above images show B and F transformation matrix for 2-dimensional vector space. For n-dim vector space, we have something like that<br>
<img src="https://discuss.pytorch.org/uploads/default/original/2X/2/26cc9ea5519addd92d3cba7913f3d979177b24cf.png" alt="image" data-base62-sha1="5xexs9YJSZBIBQ2pc37YOP5TxPV" width="411" height="433"><br>
Since the feature of an image can be thought as belonging to an n-dimensional feature space, is it possible to make pytorch learn the transformation matrices through a machine learning procedure? The two input images belong to two different views/feature space as shown below<br>
<img src="https://discuss.pytorch.org/uploads/default/original/2X/7/72ab88a86e3ce6b3d2aee40e5acb0baef10c9612.jpeg" alt="0022_c5s1_002851_01" data-base62-sha1="gmpWlLncp6lPMt175lRKYVIcxhM" width="64" height="128"> <img src="https://discuss.pytorch.org/uploads/default/original/2X/2/2f7b26d4d377237194a330f2b5e8aa6513e5209d.jpeg" alt="0022_c3s1_044676_01" data-base62-sha1="6M2i7UatpWvyfj8hsVpguaUOktn" width="64" height="128"></p>

astrla: <p>I dont have the answer to this, new here!</p>
<p>But the first step of the problem would be to input the information on the neural network (better idea on what to use?)</p>
<p>First tough was to vectorize the matrix, but according to this paper information would be lost in the way, as well it requires much computer power, not very efficient</p>
<p>Matrix Neural Networks<br>
<aside class="onebox pdf">
  <header class="source">
      <a href="https://arxiv.org/pdf/1601.03805.pdf" target="_blank" rel="nofollow noopener">arxiv.org</a>
  </header>
  <article class="onebox-body">
    <a href="https://arxiv.org/pdf/1601.03805.pdf" target="_blank" rel="nofollow noopener"><span class="pdf-onebox-logo"></span></a>
<h3><a href="https://arxiv.org/pdf/1601.03805.pdf" target="_blank" rel="nofollow noopener">1601.03805.pdf</a></h3>

<p class="filesize">3.91 MB</p>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>
<p>gonna keep reading it, if I get to understand you’re going to know. The paper is about a Neural Network designed for the job</p>

Daniel_Munoz: <p>I don’t know how it would make sense, given that you want to change from one “feature space” to another “feature space”, and for obtain the forward and backward matrix, you need to define functions between feature spaces. So for example, if you have your “eigenface space”, and you want to translate that to the “manuscrit number space”, you may find a matrix that link between spaces, but then you use your eigenface space to recognize manuscrit numbers and you need to relearn the identification, and may be change your space.</p>