class_docstr: Generic fusion method which takes a callable which takes the list of input tensors
  and expects a single tensor to be used. This class can be used to implement fusion
  methods like "sum", "max" and "prod".
class_docstr_tok: ["Generic","fusion","method","which","takes","a","callable","which","takes","the","list","of","input","tensors","and","expects","a","single","tensor","to","be","used",".","This","class","can","be","used","to","implement","fusion","methods","like","``","sum","''",",","``","max","''","and","``","prod","''","."]
code: def __init__(
      self,
      feature_dims: List[int],
      reduce_fn: Callable[[torch.Tensor], torch.Tensor],
  ):
      super().__init__()
      _verify_feature_dim(feature_dims)
      self.reduce_fn = reduce_fn
  
      # All input dimensions must be the same
      self._output_dim = max(feature_dims)
      assert self._output_dim == min(feature_dims)
  
imports: from typing import Callable, List
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ReduceFusion object from inherited base classes: nn with example: obj = ReduceFusion(feature_dims, reduce_fn)