code: def test_dense_backprop(self):
      func = compile_func(
          [
              self.input_layer.get_activation_vars(),
              self.input_layer.get_reference_vars(),
          ],
          self.dense_layer.get_pos_mxts(),
      )
      self.dense_layer.update_task_index(task_index=1)
      self.assertListEqual(
          [list(x) for x in func([self.inp, np.zeros_like(self.inp)])],
          [[0.0, 1.0], [0.0, 1.0]],
      )
      func = compile_func(
          [
              self.input_layer.get_activation_vars(),
              self.input_layer.get_reference_vars(),
          ],
          self.input_layer.get_mxts(),
      )
      self.dense_layer.update_task_index(task_index=0)
      self.assertListEqual(
          [list(x) for x in func([self.inp, np.zeros_like(self.inp)])],
          [self.w1, self.w1],
      )
      self.dense_layer.update_task_index(task_index=1)
      self.assertListEqual(
          [list(x) for x in func([self.inp, np.zeros_like(self.inp)])],
          [self.w2, self.w2],
      )
  
file_path: deeplift/tests/layers/test_dense.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
  import deeplift.layers
  from deeplift.layers import DenseMxtsMode
  from deeplift.util import compile_func
label_desc: Use image node_id 3 for calling the TestDense obj's underlying member method code with example usage: obj.test_dense_backprop() without return types