docstr: Args:
      images: tensor of shape (D1, D2, ..., DN, C, H, W)
      vals: tensor of shape (D1, D2, ..., DN, 1, H, W)
  
  Returns:
      smoothness loss of shape (D1, D2, ..., DN)
code: def forward(self, images: Tensor, vals: Tensor) -> Tensor:
      """
      Args:
          images: tensor of shape (D1, D2, ..., DN, C, H, W)
          vals: tensor of shape (D1, D2, ..., DN, 1, H, W)
  
      Returns:
          smoothness loss of shape (D1, D2, ..., DN)
      """
      img_gx = self._x_gradient(images)
      img_gy = self._y_gradient(images)
  
      val_gx = self._x_gradient(vals)
      val_gy = self._y_gradient(vals)
  
      return _smoothness_loss_fn(img_gx, img_gy, val_gx, val_gy)
  
imports: from typing import List, Optional
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  from torchvision.prototype.models.depth.stereo.raft_stereo import grid_sample, make_coords_grid
label_desc: Use image node_id 4 for calling the SmoothnessLoss obj's underlying member method code with example usage: obj.forward(images, vals) and returns: _smoothness_loss_fn