docstr: calculate interpolation points
  Args:
      input_tensor: Tensor of shape (batch, ...), where ... indicates
                    the input dimensions. 
      reference_tensor: A tensor of shape (batch, k, ...) where ... 
          indicates dimensions, and k represents the number of background 
          reference samples to draw per input in the batch.
  Returns: 
      samples_input: A tensor of shape (batch, k, ...) with the 
          interpolated points between input and ref.
docstr_tok: ["calculate","interpolation","points","Args",":","input_tensor",":","Tensor","of","shape","(","batch",",","...",")",",","where","...","indicates","the","input","dimensions",".","reference_tensor",":","A","tensor","of","shape","(","batch",",","k",",","...",")","where","...","indicates","dimensions",",","and","k","represents","the","number","of","background","reference","samples","to","draw","per","input","in","the","batch",".","Returns",":","samples_input",":","A","tensor","of","shape","(","batch",",","k",",","...",")","with","the","interpolated","points","between","input","and","ref","."]
code: def _get_samples_input(self, input_tensor, reference_tensor):
      """
      calculate interpolation points
      Args:
          input_tensor: Tensor of shape (batch, ...), where ... indicates
                        the input dimensions.
          reference_tensor: A tensor of shape (batch, k, ...) where ...
              indicates dimensions, and k represents the number of background
              reference samples to draw per input in the batch.
      Returns:
          samples_input: A tensor of shape (batch, k, ...) with the
              interpolated points between input and ref.
      """
      input_dims = list(input_tensor.size())[1:]
      num_input_dims = len(input_dims)
  
      batch_size = reference_tensor.size()[0]
      k_ = reference_tensor.size()[1]
  
      # Grab a [batch_size, k]-sized interpolation sample
      if self.random_alpha:
          t_tensor = (
              torch.FloatTensor(batch_size, k_)
              .uniform_(0, 1)
              .to(DEFAULT_DEVICE)
          )
      else:
          if k_ == 1:
              t_tensor = torch.cat(
                  [torch.Tensor([1.0]) for i in range(batch_size)]
              ).to(DEFAULT_DEVICE)
          else:
              t_tensor = torch.cat(
                  [torch.linspace(0, 1, k_) for i in range(batch_size)]
              ).to(DEFAULT_DEVICE)
  
      shape = [batch_size, k_] + [1] * num_input_dims
      interp_coef = t_tensor.view(*shape)
  
      # Evaluate the end points
      end_point_ref = (1.0 - interp_coef) * reference_tensor
  
      input_expand_mult = input_tensor.unsqueeze(1)
      end_point_input = interp_coef * input_expand_mult
  
      # A fine Affine Combine
      samples_input = end_point_input + end_point_ref
      return samples_input
  
imports: import functools
  import operator
  import torch
  from torch.autograd import grad
  from torch.utils.data import DataLoader
label_desc: Use image node_id 3 for calling the AttributionPriorExplainer obj's underlying member method code with example usage: obj._get_samples_input(input_tensor, reference_tensor) and returns: samples_input