class_docstr: Wraps a PyTorch model (one that implements torch.nn.Module) so that model(x)
  produces SHAP values as well as predictions (controllable by 'shap_values'
  flag.
docstr: Arguments:
  base_model: PyTorch network that subclasses torch.nn.Module
  refset: PyTorch dataset - may not work with iterable-type (vs map-type) datasets
  k: int - Number of references to use by default for explanations. As low as 1 for training.
      100-200 for reliable explanations. 
docstr_tok: ["Arguments",":","base_model",":","PyTorch","network","that","subclasses","torch.nn.Module","refset",":","PyTorch","dataset","-","may","not","work","with","iterable-type","(","vs","map-type",")","datasets","k",":","int","-","Number","of","references","to","use","by","default","for","explanations",".","As","low","as","1","for","training",".","100-200","for","reliable","explanations","."]
code: def __init__(
      self,
      base_model,
      refset,
      k=1,
      random_alpha=True,
      scale_by_inputs=True,
  ):
      """
      Arguments:
      base_model: PyTorch network that subclasses torch.nn.Module
      refset: PyTorch dataset - may not work with iterable-type (vs map-type) datasets
      k: int - Number of references to use by default for explanations. As low as 1 for training.
          100-200 for reliable explanations.
      """
      super(ExpectedGradientsModel, self).__init__()
      self.k = k
      self.base = base_model
      self.refset = refset
      self.random_alpha = random_alpha
      self.exp = VariableBatchExplainer(
          self.refset,
          random_alpha=random_alpha,
          scale_by_inputs=scale_by_inputs,
      )
  
imports: import functools
  import operator
  import torch
  from torch.autograd import grad
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 to create a new ExpectedGradientsModel object from inherited base classes: torch.nn with example: obj = ExpectedGradientsModel(base_model, refset, k, random_alpha, scale_by_inputs)