class_docstr: Description
  -----------
  The index selection layer used by VIPool
  
  Parameters
  ----------
  pool_ratio : float
      The pooling ratio (for keeping nodes). For example,
      if `pool_ratio=0.8`, 80\% nodes will be preserved.
  hidden_dim : int
      The number of channels in node features.
  act : str, optional
      The activation function type.
      Default: :obj:`'prelu'`
  dist : int, optional
      DO NOT USE THIS PARAMETER
class_docstr_tok: ["Description","--","--","--","--","--","-","The","index","selection","layer","used","by","VIPool","Parameters","--","--","--","--","--","pool_ratio",":","float","The","pooling","ratio","(","for","keeping","nodes",")",".","For","example",",","if","`","pool_ratio=0.8","`",",","80\\","%","nodes","will","be","preserved",".","hidden_dim",":","int","The","number","of","channels","in","node","features",".","act",":","str",",","optional","The","activation","function","type",".","Default",":",":","obj",":","`","'prelu","'","`","dist",":","int",",","optional","DO","NOT","USE","THIS","PARAMETER"]
code: def __init__(
      self,
      pool_ratio: float,
      hidden_dim: int,
      act: str = "prelu",
      dist: int = 1,
  ):
      super(IndexSelect, self).__init__()
      self.pool_ratio = pool_ratio
      self.dist = dist
      self.dense = DenseLayer(hidden_dim, hidden_dim, act)
      self.discriminator = Discriminator(hidden_dim)
      self.gcn = GraphConvWithDropout(hidden_dim, hidden_dim)
  
imports: from typing import Optional
  import dgl
  import torch
  import torch.nn
  from dgl import DGLGraph
  from dgl.nn import GraphConv
  from torch import Tensor
label_desc: Use image node_id 1 to create a new IndexSelect object from inherited base classes: torch.nn with example: obj = IndexSelect(pool_ratio, hidden_dim, act, dist)