code: def test_relu_rescale(self):
      out_layer = layers.ReLU(
          nonlinear_mxts_mode=layers.NonlinearMxtsMode.Rescale
      )
      (
          fprop_results,
          bprop_results_each_task,
      ) = self.set_up_prediction_func_and_deeplift_func(out_layer)
      self.assertListEqual(fprop_results, [[9.0, 0.0], [19.0, 0.0]])
      # post-activation under default would be [0.0, 1.0, 0.0]
      # post-activation diff from default = [9.0, -1.0, 4.0], [19.0, -1.0, -4.0]
      # pre-activation under default would be [-1.0, 1.0]
      # pre-activation diff-from-default is [10.0, -10.0], [20.0, -20.0]
      # scale-factors: [[9.0/10.0, -1.0/-10.0], [19.0/20.0, -1.0/-20.0]]
      print(bprop_results_each_task)
      np.testing.assert_almost_equal(
          np.array(bprop_results_each_task[0]),
          np.array(
              [
                  (9.0 / 10.0) * np.array(self.w1),
                  (19.0 / 20.0) * np.array(self.w1),
              ]
          ),
          decimal=5,
      )
      np.testing.assert_almost_equal(
          np.array(bprop_results_each_task[1]),
          np.array(
              [
                  (-1.0 / -10.0) * np.array(self.w2),
                  (-1.0 / -20.0) * np.array(self.w2),
              ]
          ),
          decimal=5,
      )
  
file_path: deeplift/tests/layers/test_activation.py
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import absolute_import
  import unittest
  from unittest import skip
  import sys
  import os
  import numpy
  import deeplift.layers
  from deeplift.layers import DenseMxtsMode
  from deeplift.util import compile_func
  import tensorflow
label_desc: Use image node_id 3 for calling the TestActivations obj's underlying member method code with example usage: obj.test_relu_rescale() without return types