title: Outer sum, etc. in pytorch
body: <p>Numpy offers optimized outer operations for any <code>RxR -&gt; R</code> function, like <code>np.multiply.outer</code> or <code>np.subtract.outer</code>, with the behaviour:</p>
  
  <pre><code>&gt;&gt;&gt; np.subtract.outer([6, 5, 4], [3, 2, 1])
  array([[3, 4, 5],
         [2, 3, 4],
         [1, 2, 3]])
  </code></pre>
  
  <p><a href="https://pytorch.org/docs/stable/index.html" rel="nofollow noreferrer">Pytorch</a>  does not seem to offer such a feature (or I have missed it).<br>
  What is the best / usual / fastest / cleanest way to do so with torch tensors?</p>