class_docstr: TCAV object: runs TCAV for one target and a set of concepts.
  The static methods (get_direction_dir_sign, compute_tcav_score,
  get_directional_dir) invole getting directional derivatives and calculating
  TCAV scores. These are static because they might be useful independently,
  for instance, if you are developing a new interpretability method using
  CAVs.
  See https://arxiv.org/abs/1711.11279
docstr: Return the list of values of directional derivatives.
  
     (Only called when the values are needed as a referece)
  
  Args:
    mymodel: a model class instance
    target_class: one target class
    concept: one concept
    cav: an instance of cav
    class_acts: activations of the examples in the target class where
      examples[i] corresponds to class_acts[i]
    examples: an array of examples of the target class where examples[i]
      corresponds to class_acts[i]
  
  Returns:
    list of values of directional derivatives.
docstr_tok: ["Return","the","list","of","values","of","directional","derivatives",".","(","Only","called","when","the","values","are","needed","as","a","referece",")","Args",":","mymodel",":","a","model","class","instance","target_class",":","one","target","class","concept",":","one","concept","cav",":","an","instance","of","cav","class_acts",":","activations","of","the","examples","in","the","target","class","where","examples","[","i","]","corresponds","to","class_acts","[","i","]","examples",":","an","array","of","examples","of","the","target","class","where","examples","[","i","]","corresponds","to","class_acts","[","i","]","Returns",":","list","of","values","of","directional","derivatives","."]
code: def get_directional_dir(
      mymodel, target_class, concept, cav, class_acts, examples
  ):
      """Return the list of values of directional derivatives.
  
         (Only called when the values are needed as a referece)
  
      Args:
        mymodel: a model class instance
        target_class: one target class
        concept: one concept
        cav: an instance of cav
        class_acts: activations of the examples in the target class where
          examples[i] corresponds to class_acts[i]
        examples: an array of examples of the target class where examples[i]
          corresponds to class_acts[i]
  
      Returns:
        list of values of directional derivatives.
      """
      class_id = mymodel.label_to_id(target_class)
      directional_dir_vals = []
      for i in range(len(class_acts)):
          act = np.expand_dims(class_acts[i], 0)
          example = examples[i]
          grad = np.reshape(
              mymodel.get_gradient(
                  act, [class_id], cav.bottleneck, example
              ),
              -1,
          )
          directional_dir_vals.append(
              np.dot(grad, cav.get_direction(concept))
          )
      return directional_dir_vals
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from multiprocessing import dummy
  from six.moves import range
  from tcav.cav import CAV
  from tcav.cav import get_or_train_cav
  from tcav import run_params
  from tcav import utils
  import numpy
  import time
  import tensorflow
label_desc: Use image node_id 3 for calling the TCAV obj's underlying member method code with example usage: obj.get_directional_dir(mymodel, target_class, concept, cav, class_acts, examples) and returns: directional_dir_vals