class_docstr: Abstract class for defining the loss function to be minimized.
  The loss function should be built by defining `build_loss` function.
  
  The attribute `name` should be defined to identify loss function with verbose outputs.
  Defaults to 'Unnamed Loss' if not overridden.
class_docstr_tok: ["Abstract","class","for","defining","the","loss","function","to","be","minimized",".","The","loss","function","should","be","built","by","defining","`","build_loss","`","function",".","The","attribute","`","name","`","should","be","defined","to","identify","loss","function","with","verbose","outputs",".","Defaults","to","'Unnamed","Loss","'","if","not","overridden","."]
docstr: Implement this function to build the loss function expression.
  Any additional arguments required to build this loss function may be passed in via `__init__`.
  
  Ideally, the function expression must be compatible with all keras backends and `channels_first` or
  `channels_last` image_data_format(s). `utils.slicer` can be used to define data format agnostic slices.
  (just define it in `channels_first` format, it will automatically shuffle indices for tensorflow
  which uses `channels_last` format).
  
  ```python
  # theano slice
  conv_layer[:, filter_idx, ...]
  
  # TF slice
  conv_layer[..., filter_idx]
  
  # Backend agnostic slice
  conv_layer[utils.slicer[:, filter_idx, ...]]
  ```
  
  [utils.get_img_shape](vis.utils.utils.md#get_img_shape) is another optional utility that make this easier.
  
  Returns:
      The loss expression.
docstr_tok: ["Implement","this","function","to","build","the","loss","function","expression",".","Any","additional","arguments","required","to","build","this","loss","function","may","be","passed","in","via","`","__init__","`",".","Ideally",",","the","function","expression","must","be","compatible","with","all","keras","backends","and","`","channels_first","`","or","`","channels_last","`","image_data_format","(","s",")",".","`","utils.slicer","`","can","be","used","to","define","data","format","agnostic","slices",".","(","just","define","it","in","`","channels_first","`","format",",","it","will","automatically","shuffle","indices","for","tensorflow","which","uses","`","channels_last","`","format",")",".","``","`","python","#","theano","slice","conv_layer","[",":",",","filter_idx",",","...","]","#","TF","slice","conv_layer","[","...",",","filter_idx","]","#","Backend","agnostic","slice","conv_layer","[","utils.slicer","[",":",",","filter_idx",",","...","]","]","``","`","[","utils.get_img_shape","]","(","vis.utils.utils.md","#","get_img_shape",")","is","another","optional","utility","that","make","this","easier",".","Returns",":","The","loss","expression","."]
code: def build_loss(self):
      """Implement this function to build the loss function expression.
      Any additional arguments required to build this loss function may be passed in via `__init__`.
  
      Ideally, the function expression must be compatible with all keras backends and `channels_first` or
      `channels_last` image_data_format(s). `utils.slicer` can be used to define data format agnostic slices.
      (just define it in `channels_first` format, it will automatically shuffle indices for tensorflow
      which uses `channels_last` format).
  
      ```python
      # theano slice
      conv_layer[:, filter_idx, ...]
  
      # TF slice
      conv_layer[..., filter_idx]
  
      # Backend agnostic slice
      conv_layer[utils.slicer[:, filter_idx, ...]]
      ```
  
      [utils.get_img_shape](vis.utils.utils.md#get_img_shape) is another optional utility that make this easier.
  
      Returns:
          The loss expression.
      """
      raise NotImplementedError()
  
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 3 for calling the Loss obj's underlying member method code with example usage: obj.build_loss() without return types