class_docstr: Description
  -----------
  The Graph Cross Network.
  
  Parameters
  ----------
  in_dim : int
      The number of input node feature channels.
  out_dim : int
      The number of output node feature channels.
  edge_feat_dim : int, optional
      The number of input edge feature channels. Edge feature
      will be passed to a Linear layer and concatenated to
      input node features. Default: :obj:`0`
  hidden_dim : int, optional
      The number of hidden node feature channels.
      Default: :obj:`96`
  pool_ratios : Union[float, List[float]], optional
      The pooling ratios (for keeping nodes) for each layer.
      For example, if `pool_ratio=0.8`, 80\% nodes will be preserved.
      If a single float number is given, all pooling layers will have the
      same pooling ratio.
      Default: :obj:`[0.9, 0.7]`
  readout_nodes : int, optional
      Number of nodes perserved in the final sort pool operation.
      Default: :obj:`30`
  conv1d_dims : List[int], optional
      The number of kernels of Conv1d operations.
      Default: :obj:`[16, 32]`
  conv1d_kws : List[int], optional
      The kernel size of Conv1d.
      Default: :obj:`[5]`
  cross_weight : float, optional
      The weight parameter used in graph cross layers
      Default: :obj:`1.0`
  fuse_weight : float, optional
      The weight parameter used at the end of GXN for channel fusion.
      Default: :obj:`1.0`
class_docstr_tok: ["Description","--","--","--","--","--","-","The","Graph","Cross","Network",".","Parameters","--","--","--","--","--","in_dim",":","int","The","number","of","input","node","feature","channels",".","out_dim",":","int","The","number","of","output","node","feature","channels",".","edge_feat_dim",":","int",",","optional","The","number","of","input","edge","feature","channels",".","Edge","feature","will","be","passed","to","a","Linear","layer","and","concatenated","to","input","node","features",".","Default",":",":","obj",":","`","0","`","hidden_dim",":","int",",","optional","The","number","of","hidden","node","feature","channels",".","Default",":",":","obj",":","`","96","`","pool_ratios",":","Union","[","float",",","List","[","float","]","]",",","optional","The","pooling","ratios","(","for","keeping","nodes",")","for","each","layer",".","For","example",",","if","`","pool_ratio=0.8","`",",","80\\","%","nodes","will","be","preserved",".","If","a","single","float","number","is","given",",","all","pooling","layers","will","have","the","same","pooling","ratio",".","Default",":",":","obj",":","`","[","0.9",",","0.7","]","`","readout_nodes",":","int",",","optional","Number","of","nodes","perserved","in","the","final","sort","pool","operation",".","Default",":",":","obj",":","`","30","`","conv1d_dims",":","List","[","int","]",",","optional","The","number","of","kernels","of","Conv1d","operations",".","Default",":",":","obj",":","`","[","16",",","32","]","`","conv1d_kws",":","List","[","int","]",",","optional","The","kernel","size","of","Conv1d",".","Default",":",":","obj",":","`","[","5","]","`","cross_weight",":","float",",","optional","The","weight","parameter","used","in","graph","cross","layers","Default",":",":","obj",":","`","1.0","`","fuse_weight",":","float",",","optional","The","weight","parameter","used","at","the","end","of","GXN","for","channel","fusion",".","Default",":",":","obj",":","`","1.0","`"]
code: def init_weights(self):
      if self.e2l_lin is not None:
          torch.nn.init.xavier_normal_(self.e2l_lin.weight)
      torch.nn.init.xavier_normal_(self.final_conv1.weight)
      torch.nn.init.xavier_normal_(self.final_conv2.weight)
      if self.out_dim > 0:
          torch.nn.init.xavier_normal_(self.out_lin.weight)
  
file_path: dgl/examples/pytorch/gxn/networks.py
imports: from typing import List, Tuple, Union
  from layers import *
  import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn.pytorch.glob import SortPooling
label_desc: Use image node_id 2 for calling the GraphCrossNet obj's underlying member method code with example usage: obj.init_weights() without return types