title: Image similarity using Tensorflow or PyTorch
body: <p>I want to compare two images for similarity. Since my purpose is to match a given image against a massive collection of images, I want to run the comparisons on GPU.</p>
  
  <p>I came across <code>tf.image.ssim</code> and <code>tf.image.psnr</code> functions but I am unable to find and working examples only. The solutions in PyTorch is also appreciated. Since I don't have a good understanding of CUDA and C language, I am hesitant to try kernels in PyCuda.</p>
  
  <p>Will it be helpful in terms of processing if I read the entire image collection and store as Tensorflow Records for future processing?</p>
  
  <p>Any guidance or solution, greatly appreciated. Thank you.</p>
  
  <p>Edit:- I am matching images of same size only. I don't want to do mere histogram match. I want to do SSIM or PSNR implementation for image similarity. So, I am assuming it would be similar in color, content etc</p>