docstr: Constructs a linear model with a training function and additional
  construction arguments that will be sent to
  `self._construct_model_params` after a `self.fit` is called. Please note
  that this assumes the `self.train_fn` will call
  `self._construct_model_params`.
  
  Please note that this is an experimental feature.
  
  Args:
      train_fn (Callable)
          The function to train with. See
          `captum._utils.models.linear_model.train.sgd_train_linear_model`
          and
          `captum._utils.models.linear_model.train.sklearn_train_linear_model`
          for examples
      kwargs
          Any additional keyword arguments to send to
          `self._construct_model_params` once a `self.fit` is called.
code: def __init__(self, train_fn: Callable, **kwargs) -> None:
      r"""
      Constructs a linear model with a training function and additional
      construction arguments that will be sent to
      `self._construct_model_params` after a `self.fit` is called. Please note
      that this assumes the `self.train_fn` will call
      `self._construct_model_params`.
  
      Please note that this is an experimental feature.
  
      Args:
          train_fn (Callable)
              The function to train with. See
              `captum._utils.models.linear_model.train.sgd_train_linear_model`
              and
              `captum._utils.models.linear_model.train.sklearn_train_linear_model`
              for examples
          kwargs
              Any additional keyword arguments to send to
              `self._construct_model_params` once a `self.fit` is called.
      """
      super().__init__()
  
      self.norm: Optional[nn.Module] = None
      self.linear: Optional[nn.Linear] = None
      self.train_fn = train_fn
      self.construct_kwargs = kwargs
  
imports: from typing import Callable, cast, List, Optional
  import torch.nn
  from captum._utils.models.model import Model
  from torch import Tensor
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 to create a new LinearModel object from inherited base classes: nn, Model with example: obj = LinearModel(train_fn)