class_docstr: Base class for classes computing the loss / gradient. The class can
  be initialized with settings if needed. It provides get_loss and
  get_grad as separate methods to allow calculating them separately. It
  also provides a __call__ method that returns a tuple of both.
class_docstr_tok: ["Base","class","for","classes","computing","the","loss","\/","gradient",".","The","class","can","be","initialized","with","settings","if","needed",".","It","provides","get_loss","and","get_grad","as","separate","methods","to","allow","calculating","them","separately",".","It","also","provides","a","__call__","method","that","returns","a","tuple","of","both","."]
code: def __init__(self, **kwargs: Any) -> None:
      ...
  
imports: from abc import abstractmethod
  from typing import Any, Dict, Generic, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  from .config import registry
  from .types import Floats2d, Ints1d
  from .util import get_array_module, to_categorical
label_desc: Use image node_id 1 to create a new Loss object from inherited base classes: Generic with example: obj = Loss()