class_docstr: GeneralFeature is used for non-specified feature visualization in Insights.
  It can be used for dense or sparse features.
  
  Currently general features are only supported for 2-d tensors, in the format (N, C)
  where N is the number of samples and C is the number of categories.
class_docstr_tok: ["GeneralFeature","is","used","for","non-specified","feature","visualization","in","Insights",".","It","can","be","used","for","dense","or","sparse","features",".","Currently","general","features","are","only","supported","for","2-d","tensors",",","in","the","format","(","N",",","C",")","where","N","is","the","number","of","samples","and","C","is","the","number","of","categories","."]
docstr: Args:
      name (str): The label of the specific feature. For example, an
                  ImageFeature's name can be "Photo".
      categories (list[str]): Category labels for the general feature. The
                  order and size should match the second dimension of the
                  ``data`` tensor parameter in ``visualize``.
docstr_tok: ["Args",":","name","(","str",")",":","The","label","of","the","specific","feature",".","For","example",",","an","ImageFeature","'s","name","can","be","``","Photo","''",".","categories","(","list","[","str","]",")",":","Category","labels","for","the","general","feature",".","The","order","and","size","should","match","the","second","dimension","of","the","``","data","``","tensor","parameter","in","``","visualize","``","."]
code: def __init__(self, name: str, categories: List[str]) -> None:
      r"""
      Args:
          name (str): The label of the specific feature. For example, an
                      ImageFeature's name can be "Photo".
          categories (list[str]): Category labels for the general feature. The
                      order and size should match the second dimension of the
                      ``data`` tensor parameter in ``visualize``.
      """
      super().__init__(
          name,
          baseline_transforms=None,
          input_transforms=None,
          visualization_transform=None,
      )
      self.categories = categories
  
imports: import base64
  import warnings
  from collections import namedtuple
  from io import BytesIO
  from typing import Callable, List, Optional, Union
  from captum._utils.common import safe_div
  from captum.attr._utils import visualization
  from captum.insights.attr_vis._utils.transforms import format_transforms
label_desc: Use image node_id 1 to create a new GeneralFeature object from inherited base classes: BaseFeature with example: obj = GeneralFeature(name, categories)