[docs]classHyperGCN(nn.Module):r"""The HyperGCN model proposed in `HyperGCN: A New Method of Training Graph Convolutional Networks on Hypergraphs <https://papers.nips.cc/paper/2019/file/1efa39bcaec6f3900149160693694536-Paper.pdf>`_ paper (NeurIPS 2019). Parameters: ``in_channels`` (``int``): :math:`C_{in}` is the number of input channels. ``hid_channels`` (``int``): :math:`C_{hid}` is the number of hidden channels. ``num_classes`` (``int``): The Number of class of the classification task. ``use_mediator`` (``str``): Whether to use mediator to transform the hyperedges to edges in the graph. Defaults to ``False``. ``fast`` (``bool``): If set to ``True``, the transformed graph structure will be computed once from the input hypergraph and vertex features, and cached for future use. Defaults to ``True``. ``drop_rate`` (``float``, optional): Dropout ratio. Defaults to 0.5. """def__init__(self,in_channels:int,hid_channels:int,num_classes:int,use_mediator:bool=False,use_bn:bool=False,fast:bool=True,drop_rate:float=0.5,)->None:super().__init__()self.fast=fastself.cached_g=Noneself.with_mediator=use_mediatorself.layers=nn.ModuleList()self.layers.append(HyperGCNConv(in_channels,hid_channels,use_mediator,use_bn=use_bn,drop_rate=drop_rate,))self.layers.append(HyperGCNConv(hid_channels,num_classes,use_mediator,use_bn=use_bn,is_last=True))