code: def _dot_cossim(x, y, cossim_pow=0):
      eps = 1e-4
      xy_dot = _dot(x, y)
      if cossim_pow == 0:
          return tf.reduce_mean(xy_dot)
      x_mags = tf.sqrt(_dot(x, x))
      y_mags = tf.sqrt(_dot(y, y))
      cossims = xy_dot / (eps + x_mags) / (eps + y_mags)
      floored_cossims = tf.maximum(0.1, cossims)
      return tf.reduce_mean(xy_dot * floored_cossims**cossim_pow)
  
file_path: lucid/lucid/optvis/objectives_util.py
imports: from __future__ import absolute_import, division, print_function
  from decorator import decorator
  import numpy
  import tensorflow
  import lucid.misc.graph_analysis.property_inference
label_desc: Use image node_id 2 for calling a global function with example usage: _dot_cossim(x, y, cossim_pow) and returns: tf, tf