spateo.external.CAST.model.model_GCNII ====================================== .. py:module:: spateo.external.CAST.model.model_GCNII Classes ------- .. autoapisummary:: spateo.external.CAST.model.model_GCNII.Args spateo.external.CAST.model.model_GCNII.Encoder spateo.external.CAST.model.model_GCNII.GCNII spateo.external.CAST.model.model_GCNII.GCN spateo.external.CAST.model.model_GCNII.CCA_SSG Functions --------- .. autoapisummary:: spateo.external.CAST.model.model_GCNII.standardize Module Contents --------------- .. py:class:: Args .. py:attribute:: dataname :type: str .. py:attribute:: gpu :type: int :value: 0 .. py:attribute:: epochs :type: int :value: 1000 .. py:attribute:: lr1 :type: float :value: 0.001 .. py:attribute:: wd1 :type: float :value: 0.0 .. py:attribute:: lambd :type: float :value: 0.001 .. py:attribute:: n_layers :type: int :value: 9 .. py:attribute:: der :type: float :value: 0.2 .. py:attribute:: dfr :type: float :value: 0.2 .. py:attribute:: device :type: str .. py:attribute:: encoder_dim :type: int :value: 256 .. py:attribute:: use_encoder :type: bool :value: False .. py:method:: __post_init__() .. py:function:: standardize(x, eps=1e-12) .. py:class:: Encoder(in_dim: int, encoder_dim: int) Bases: :py:obj:`torch.nn.Module` Base class for all neural network modules. Your models should also subclass this class. Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:: import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) Submodules assigned in this way will be registered, and will have their parameters converted too when you call :meth:`to`, etc. .. note:: As per the example above, an ``__init__()`` call to the parent class must be made before assignment on the child. :ivar training: Boolean represents whether this module is in training or evaluation mode. :vartype training: bool .. py:attribute:: layer .. py:attribute:: relu .. py:method:: forward(x) .. py:class:: GCNII(in_dim: int, encoder_dim: int, n_layers: int, alpha=None, lambda_=None, use_encoder=False) Bases: :py:obj:`torch.nn.Module` Base class for all neural network modules. Your models should also subclass this class. Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:: import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) Submodules assigned in this way will be registered, and will have their parameters converted too when you call :meth:`to`, etc. .. note:: As per the example above, an ``__init__()`` call to the parent class must be made before assignment on the child. :ivar training: Boolean represents whether this module is in training or evaluation mode. :vartype training: bool .. py:attribute:: n_layers .. py:attribute:: use_encoder :value: False .. py:attribute:: relu .. py:attribute:: convs .. py:method:: forward(graph, x) .. py:class:: GCN(in_dim: int, encoder_dim: int, n_layers: int, use_encoder=False) Bases: :py:obj:`torch.nn.Module` Base class for all neural network modules. Your models should also subclass this class. Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:: import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) Submodules assigned in this way will be registered, and will have their parameters converted too when you call :meth:`to`, etc. .. note:: As per the example above, an ``__init__()`` call to the parent class must be made before assignment on the child. :ivar training: Boolean represents whether this module is in training or evaluation mode. :vartype training: bool .. py:attribute:: n_layers .. py:attribute:: use_encoder :value: False .. py:attribute:: relu .. py:attribute:: convs .. py:method:: forward(graph, x) .. py:class:: CCA_SSG(in_dim, encoder_dim, n_layers, backbone='GCNII', alpha=None, lambda_=None, use_encoder=False) Bases: :py:obj:`torch.nn.Module` Base class for all neural network modules. Your models should also subclass this class. Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:: import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 20, 5) self.conv2 = nn.Conv2d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) Submodules assigned in this way will be registered, and will have their parameters converted too when you call :meth:`to`, etc. .. note:: As per the example above, an ``__init__()`` call to the parent class must be made before assignment on the child. :ivar training: Boolean represents whether this module is in training or evaluation mode. :vartype training: bool .. py:method:: get_embedding(graph, feat) .. py:method:: forward(graph1, feat1, graph2, feat2)