class_docstr: Concepts are human-friendly abstract representations that can be
  numerically encoded into torch tensors. They can be illustrated as
  images, text or any other form of representation. In case of images,
  for example, "stripes" concept can be represented through a number
  of example images resembling "stripes" in various different
  contexts. In case of Natural Language Processing, the concept of
  "happy", for instance, can be illustrated through a number of
  adjectives and words that convey happiness.
docstr: Args:
      id (int): The unique identifier of the concept.
      name (str): A unique name of the concept.
      data_iter (DataLoader): A pytorch DataLoader object that combines a dataset
                  and a sampler, and provides an iterable over a given
                  dataset. Only the input batches are provided by `data_iter`.
                  Concept ids can be used as labels if necessary.
                  For more information, please check:
                  https://pytorch.org/docs/stable/data.html
  
  Example::
  
      >>> # Creates a Concept object named "striped", with a data_iter
      >>> # object to iterate over all files in "./concepts/striped"
      >>> concept_name = "striped"
      >>> concept_path = os.path.join("./concepts", concept_name) + "/"
      >>> concept_iter = dataset_to_dataloader(
      >>> get_tensor_from_filename, concepts_path=concept_path)
      >>> concept_object = Concept(
              id=0, name=concept_name, data_iter=concept_iter)
docstr_tok: ["Args",":","id","(","int",")",":","The","unique","identifier","of","the","concept",".","name","(","str",")",":","A","unique","name","of","the","concept",".","data_iter","(","DataLoader",")",":","A","pytorch","DataLoader","object","that","combines","a","dataset","and","a","sampler",",","and","provides","an","iterable","over","a","given","dataset",".","Only","the","input","batches","are","provided","by","`","data_iter","`",".","Concept","ids","can","be","used","as","labels","if","necessary",".","For","more","information",",","please","check",":","https",":","\/\/pytorch.org\/docs\/stable\/data.html","Example",":",":",">",">",">","#","Creates","a","Concept","object","named","``","striped","''",",","with","a","data_iter",">",">",">","#","object","to","iterate","over","all","files","in","``",".\/concepts\/striped","''",">",">",">","concept_name","=","``","striped","''",">",">",">","concept_path","=","os.path.join","(","``",".\/concepts","''",",","concept_name",")","+","``","\/","''",">",">",">","concept_iter","=","dataset_to_dataloader","(",">",">",">","get_tensor_from_filename",",","concepts_path=concept_path",")",">",">",">","concept_object","=","Concept","(","id=0",",","name=concept_name",",","data_iter=concept_iter",")"]
code: def __init__(
      self,
      id: int,
      name: str,
      data_iter: Union[None, torch.utils.data.DataLoader],
  ) -> None:
      r"""
      Args:
          id (int): The unique identifier of the concept.
          name (str): A unique name of the concept.
          data_iter (DataLoader): A pytorch DataLoader object that combines a dataset
                      and a sampler, and provides an iterable over a given
                      dataset. Only the input batches are provided by `data_iter`.
                      Concept ids can be used as labels if necessary.
                      For more information, please check:
                      https://pytorch.org/docs/stable/data.html
  
      Example::
  
          >>> # Creates a Concept object named "striped", with a data_iter
          >>> # object to iterate over all files in "./concepts/striped"
          >>> concept_name = "striped"
          >>> concept_path = os.path.join("./concepts", concept_name) + "/"
          >>> concept_iter = dataset_to_dataloader(
          >>> get_tensor_from_filename, concepts_path=concept_path)
          >>> concept_object = Concept(
                  id=0, name=concept_name, data_iter=concept_iter)
      """
  
      self.id = id
      self.name = name
      self.data_iter = data_iter
  
file_path: captum/captum/concept/_core/concept.py
imports: from typing import Callable, Union
  import torch
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new Concept object  with example: obj = Concept(id, name, data_iter)