class_docstr: Computes the crossentropy metric between the labels and predictions.
  This is used when there are multiple lables. The labels should be in
  the form of one-hot vectors.
  
  Usage:
  
  ```python
  pred = torch.tensor([[0.05, 0.95, 0], [0.1, 0.8, 0.1]])
  target = torch.tensor([[0, 1, 0], [0, 0, 1]])
  entropy = CategoricalCrossEntropy()
  entropy(pred, target)
  assert abs(entropy.compute() - 1.1769392) < 1e-6
  ```
class_docstr_tok: ["Computes","the","crossentropy","metric","between","the","labels","and","predictions",".","This","is","used","when","there","are","multiple","lables",".","The","labels","should","be","in","the","form","of","one-hot","vectors",".","Usage",":","``","`","python","pred","=","torch.tensor","(","[","[","0.05",",","0.95",",","0","]",",","[","0.1",",","0.8",",","0.1","]","]",")","target","=","torch.tensor","(","[","[","0",",","1",",","0","]",",","[","0",",","0",",","1","]","]",")","entropy","=","CategoricalCrossEntropy","(",")","entropy","(","pred",",","target",")","assert","abs","(","entropy.compute","(",")","-","1.1769392",")","<","1e-6","``","`"]
code: def compute(self):
      return self.crossentropy.float() / self.total
  
imports: import torch
  from abc import ABC, abstractmethod
label_desc: Use image node_id 3 for calling the CategoricalCrossEntropy obj's underlying member method code with example usage: obj.compute() and returns: unknown