class_docstr: A loss function that maximizes the activation of a set of filters within a particular layer.
  
  Typically this loss is used to ask the reverse question - What kind of input image would increase the networks
  confidence, for say, dog class. This helps determine what the network might be internalizing as being the 'dog'
  image space.
  
  One might also use this to generate an input image that maximizes both 'dog' and 'human' outputs on the final
  `keras.layers.Dense` layer.
class_docstr_tok: ["A","loss","function","that","maximizes","the","activation","of","a","set","of","filters","within","a","particular","layer",".","Typically","this","loss","is","used","to","ask","the","reverse","question","-","What","kind","of","input","image","would","increase","the","networks","confidence",",","for","say",",","dog","class",".","This","helps","determine","what","the","network","might","be","internalizing","as","being","the","'dog'","image","space",".","One","might","also","use","this","to","generate","an","input","image","that","maximizes","both","'dog","'","and","'human","'","outputs","on","the","final","`","keras.layers.Dense","`","layer","."]
docstr: Args:
      layer: The keras layer whose filters need to be maximized. This can either be a convolutional layer
          or a dense layer.
      filter_indices: filter indices within the layer to be maximized.
          For `keras.layers.Dense` layer, `filter_idx` is interpreted as the output index.
  
          If you are optimizing final `keras.layers.Dense` layer to maximize class output, you tend to get
          better results with 'linear' activation as opposed to 'softmax'. This is because 'softmax'
          output can be maximized by minimizing scores for other classes.
docstr_tok: ["Args",":","layer",":","The","keras","layer","whose","filters","need","to","be","maximized",".","This","can","either","be","a","convolutional","layer","or","a","dense","layer",".","filter_indices",":","filter","indices","within","the","layer","to","be","maximized",".","For","`","keras.layers.Dense","`","layer",",","`","filter_idx","`","is","interpreted","as","the","output","index",".","If","you","are","optimizing","final","`","keras.layers.Dense","`","layer","to","maximize","class","output",",","you","tend","to","get","better","results","with","'linear","'","activation","as","opposed","to","'softmax","'",".","This","is","because","'softmax'","output","can","be","maximized","by","minimizing","scores","for","other","classes","."]
code: def __init__(self, layer, filter_indices):
      """
      Args:
          layer: The keras layer whose filters need to be maximized. This can either be a convolutional layer
              or a dense layer.
          filter_indices: filter indices within the layer to be maximized.
              For `keras.layers.Dense` layer, `filter_idx` is interpreted as the output index.
  
              If you are optimizing final `keras.layers.Dense` layer to maximize class output, you tend to get
              better results with 'linear' activation as opposed to 'softmax'. This is because 'softmax'
              output can be maximized by minimizing scores for other classes.
      """
      super(ActivationMaximization, self).__init__()
      self.name = "ActivationMax Loss"
      self.layer = layer
      self.filter_indices = utils.listify(filter_indices)
  
file_path: keras-vis/vis/losses.py
imports: from __future__ import absolute_import
  from keras import backend
  from .utils import utils
label_desc: Use image node_id 1 to create a new ActivationMaximization object from inherited base classes: Loss with example: obj = ActivationMaximization(layer, filter_indices)