class_docstr: W**2 rule from Deep Taylor Decomposition
class_docstr_tok: ["W","*","*","2","rule","from","Deep","Taylor","Decomposition"]
code: def __init__(self, layer: Layer, _state, copy_weights=False) -> None:
      # W-square rule works with squared weights and no biases.
      if copy_weights:
          weights = layer.get_weights()
      else:
          weights = layer.weights
      if getattr(layer, "use_bias", False):
          weights = weights[:-1]
      weights = [x**2 for x in weights]
  
      self._layer_wo_act_b = igraph.copy_layer_wo_activation(
          layer,
          keep_bias=False,
          weights=weights,
          name_template="reversed_kernel_%s",
      )
  
imports: from __future__ import annotations
  import numpy
  import tensorflow.keras.backend
  import tensorflow.keras.layers
  import innvestigate.analyzer.relevance_based.utils
  import innvestigate.backend
  import innvestigate.backend.graph
  import innvestigate.layers
  from innvestigate.backend.types import Layer, OptionalList, Tensor
label_desc: Use image node_id 1 to create a new WSquareRule object from inherited base classes: igraph with example: obj = WSquareRule(layer, _state, copy_weights)