Answers.Body: <p>Yes, with some limitations. </p>
  
  <p>CNNs can be used to map images to related images, and that should include many simple matrix transformations. For instance, <a href="https://github.com/sandeepraju/ihradis-cnn-deblur/blob/master/hradis15CNNdeblurring.pdf" rel="nofollow noreferrer">here is an example of de-blurring OCRed text using a CNN</a>.</p>
  
  <p>Basically, you would train your network with lots of A, B examples, with the input as B and desired output as A.</p>
  
  <p>The limitation is that where you have transformations that are technically irreversible, then the CNN may learn to produce a best "mean" output. The symptom of this will be fuzzy images lacking high frequency components, and matrices which are not representative of the target distribution, but that do solve the transformation (within limits of training accuracy). If you want to improve on that, and produce a more realistic/precise original, then you will probably want to look at adding a generative component - a GAN, VAE/GAN or RBM etc. Note this would not accurately produce the original matrix, but would generate one that both transformed into your given transformed matrix (within some level of accuracy) and was sampled from your input distribution. That is, it could be more of a <em>feasible</em> original than one generated using a simpler CNN architecture.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-21T17:18:00.887Z
Answers.LastActivityDate: 2018-08-21T17:18:00.887Z
Answers.UserDisplayName: Neil Slater
Body: <p>Imagine I have a 2D matrix, A. I apply some transformation to it, for example:
  B = A_shifted + A.</p>
  
  <p>Would it be possible to train a CNN to learn back the mapping from B to A? Giving B as example and A as target?</p>
  
  <p>Thanks!</p>
  
Tags: <convolutional-neural-networks>
Title: Figuring out mapping between two matrices
UserDisplayName: M. Alican Noyan
ThreadText: # Figuring out mapping between two matrices
  
  (Asked by: username_0 on 2018-08-21)
  
  Imagine I have a 2D matrix, A. I apply some transformation to it, for example:
  B = A\_shifted + A.
  
  Would it be possible to train a CNN to learn back the mapping from B to A? Giving B as example and A as target?
  
  Thanks!
  
  **Tags:** convolutional-neural-networks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-21. Score: 2 | Accepted answer
  
  Yes, with some limitations.
  
  CNNs can be used to map images to related images, and that should include many simple matrix transformations. For instance, [here is an example of de-blurring OCRed text using a CNN](https://github.com/sandeepraju/ihradis-cnn-deblur/blob/master/hradis15CNNdeblurring.pdf).
  
  Basically, you would train your network with lots of A, B examples, with the input as B and desired output as A.
  
  The limitation is that where you have transformations that are technically irreversible, then the CNN may learn to produce a best "mean" output. The symptom of this will be fuzzy images lacking high frequency components, and matrices which are not representative of the target distribution, but that do solve the transformation (within limits of training accuracy). If you want to improve on that, and produce a more realistic/precise original, then you will probably want to look at adding a generative component - a GAN, VAE/GAN or RBM etc. Note this would not accurately produce the original matrix, but would generate one that both transformed into your given transformed matrix (within some level of accuracy) and was sampled from your input distribution. That is, it could be more of a *feasible* original than one generated using a simpler CNN architecture.
  
  
  ---
  
  