class_docstr: Base ModelInterface for torch and tensorflow models.
class_docstr_tok: ["Base","ModelInterface","for","torch","and","tensorflow","models","."]
docstr: Consider the first layer neuron before non-linearity: z = w^T * x1 + b1. We update
  the bias b1 to b2:= b1 - w^T * m. The operation is necessary for Input Invariance metric.
  
  
  Parameters
  ----------
  input_shift: Union[int, float]
      Shift to be applied.
  shape: tuple
      Model input shape.
  
  Returns
  -------
  new_model: torch.nn
      The resulting model with a shifted first layer.
docstr_tok: ["Consider","the","first","layer","neuron","before","non-linearity",":","z","=","w^T","*","x1","+","b1",".","We","update","the","bias","b1","to","b2",":","=","b1","-","w^T","*","m.","The","operation","is","necessary","for","Input","Invariance","metric",".","Parameters","--","--","--","--","--","input_shift",":","Union","[","int",",","float","]","Shift","to","be","applied",".","shape",":","tuple","Model","input","shape",".","Returns","--","--","--","-","new_model",":","torch.nn","The","resulting","model","with","a","shifted","first","layer","."]
code: def add_mean_shift_to_first_layer(
      self,
      input_shift: Union[int, float],
      shape: tuple,
  ):
      """
      Consider the first layer neuron before non-linearity: z = w^T * x1 + b1. We update
      the bias b1 to b2:= b1 - w^T * m. The operation is necessary for Input Invariance metric.
  
  
      Parameters
      ----------
      input_shift: Union[int, float]
          Shift to be applied.
      shape: tuple
          Model input shape.
  
      Returns
      -------
      new_model: torch.nn
          The resulting model with a shifted first layer.
      """
      raise NotImplementedError
  
file_path: Quantus/quantus/helpers/model/model_interface.py
imports: import warnings
  from importlib import util
  from abc import ABC, abstractmethod
  from typing import Any, Dict, Optional, Tuple, List, Union, Generator, TypeVar, Generic
  import numpy
label_desc: Use image node_id 8 for calling the ModelInterface obj's underlying member method code with example usage: obj.add_mean_shift_to_first_layer(input_shift, shape) without return types