class_docstr: The dynamic edge convolutional operator from the `"Dynamic Graph CNN
  for Learning on Point Clouds" <https://arxiv.org/abs/1801.07829>`_ paper
  (see :class:`torch_geometric.nn.conv.EdgeConv`), where the graph is
  dynamically constructed using nearest neighbors in the feature space.
  
  Args:
      nn (torch.nn.Module): A neural network :math:`h_{\mathbf{\Theta}}` that
          maps pair-wise concatenated node features :obj:`x` of shape
          `:obj:`[-1, 2 * in_channels]` to shape :obj:`[-1, out_channels]`,
          *e.g.* defined by :class:`torch.nn.Sequential`.
      k (int): Number of nearest neighbors.
      aggr (str, optional): The aggregation scheme to use
          (:obj:`"add"`, :obj:`"mean"`, :obj:`"max"`).
          (default: :obj:`"max"`)
      num_workers (int): Number of workers to use for k-NN computation.
          Has no effect in case :obj:`batch` is not :obj:`None`, or the input
          lies on the GPU. (default: :obj:`1`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.nn.conv.MessagePassing`.
  
  Shapes:
      - **input:**
        node features :math:`(|\mathcal{V}|, F_{in})` or
        :math:`((|\mathcal{V}|, F_{in}), (|\mathcal{V}|, F_{in}))`
        if bipartite,
        batch vector :math:`(|\mathcal{V}|)` or
        :math:`((|\mathcal{V}|), (|\mathcal{V}|))`
        if bipartite *(optional)*
      - **output:** node features :math:`(|\mathcal{V}|, F_{out})` or
        :math:`(|\mathcal{V}_t|, F_{out})` if bipartite
class_docstr_tok: ["The","dynamic","edge","convolutional","operator","from","the","`","``","Dynamic","Graph","CNN","for","Learning","on","Point","Clouds","''","<","https",":","\/\/arxiv.org\/abs\/1801.07829",">","`","_","paper","(","see",":","class",":","`","torch_geometric.nn.conv.EdgeConv","`",")",",","where","the","graph","is","dynamically","constructed","using","nearest","neighbors","in","the","feature","space",".","Args",":","nn","(","torch.nn.Module",")",":","A","neural","network",":","math",":","`","h_","{","\\mathbf","{","\\Theta","}","}","`","that","maps","pair-wise","concatenated","node","features",":","obj",":","`","x","`","of","shape","`",":","obj",":","`","[","-1",",","2","*","in_channels","]","`","to","shape",":","obj",":","`","[","-1",",","out_channels","]","`",",","*","e.g",".","*","defined","by",":","class",":","`","torch.nn.Sequential","`",".","k","(","int",")",":","Number","of","nearest","neighbors",".","aggr","(","str",",","optional",")",":","The","aggregation","scheme","to","use","(",":","obj",":","`","``","add","''","`",",",":","obj",":","`","``","mean","''","`",",",":","obj",":","`","``","max","''","`",")",".","(","default",":",":","obj",":","`","``","max","''","`",")","num_workers","(","int",")",":","Number","of","workers","to","use","for","k-NN","computation",".","Has","no","effect","in","case",":","obj",":","`","batch","`","is","not",":","obj",":","`","None","`",",","or","the","input","lies","on","the","GPU",".","(","default",":",":","obj",":","`","1","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.nn.conv.MessagePassing","`",".","Shapes",":","-","*","*","input",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")","`","or",":","math",":","`","(","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")",",","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")",")","`","if","bipartite",",","batch","vector",":","math",":","`","(","|\\mathcal","{","V","}","|",")","`","or",":","math",":","`","(","(","|\\mathcal","{","V","}","|",")",",","(","|\\mathcal","{","V","}","|",")",")","`","if","bipartite","*","(","optional",")","*","-","*","*","output",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","out","}",")","`","or",":","math",":","`","(","|\\mathcal","{","V","}","_t|",",","F_","{","out","}",")","`","if","bipartite"]
code: def __init__(
      self,
      nn: Callable,
      k: int,
      aggr: str = "max",
      num_workers: int = 1,
      **kwargs,
  ):
      super().__init__(aggr=aggr, flow="source_to_target", **kwargs)
  
      if knn is None:
          raise ImportError(
              "`DynamicEdgeConv` requires `torch-cluster`."
          )
  
      self.nn = nn
      self.k = k
      self.num_workers = num_workers
      self.reset_parameters()
  
file_path: pytorch_geometric/torch_geometric/nn/conv/edge_conv.py
imports: from typing import Callable, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.inits import reset
  from torch_geometric.typing import Adj, OptTensor, PairOptTensor, PairTensor
label_desc: Use image node_id 1 to create a new DynamicEdgeConv object from inherited base classes: MessagePassing with example: obj = DynamicEdgeConv(nn, k, aggr, num_workers)