title: Is there a `tensor` operation or function in Pytorch that works like cv2.dilate in OpenCV?
body: <p>I built several masks through a network. These masks are stored in a <code>torch.tensor</code> variable. I would like to do a <code>cv2.dilate</code> like operation on every channel of the <code>tensor</code>.</p>
  
  <p>I know there is a way that convert the <code>tensor</code> to <code>numpy.ndarray</code> and then apply <code>cv2.dilate</code> to every channel using a <code>for</code> loop. But since there are about 32 channels, this method might slow down the forward operation in the network.</p>