spateo.external.CAST.model.model_GCNII

Classes

Args

Encoder

Base class for all neural network modules.

GCNII

Base class for all neural network modules.

GCN

Base class for all neural network modules.

CCA_SSG

Base class for all neural network modules.

Functions

standardize(x[, eps])

Module Contents

class spateo.external.CAST.model.model_GCNII.Args[source]
dataname: str[source]
gpu: int = 0[source]
epochs: int = 1000[source]
lr1: float = 0.001[source]
wd1: float = 0.0[source]
lambd: float = 0.001[source]
n_layers: int = 9[source]
der: float = 0.2[source]
dfr: float = 0.2[source]
device: str[source]
encoder_dim: int = 256[source]
use_encoder: bool = False[source]
__post_init__()[source]
spateo.external.CAST.model.model_GCNII.standardize(x, eps=1e-12)[source]
class spateo.external.CAST.model.model_GCNII.Encoder(in_dim: int, encoder_dim: int)[source]

Bases: 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 to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:
training bool

Boolean represents whether this module is in training or evaluation mode.

layer[source]
relu[source]
forward(x)[source]
class spateo.external.CAST.model.model_GCNII.GCNII(in_dim: int, encoder_dim: int, n_layers: int, alpha=None, lambda_=None, use_encoder=False)[source]

Bases: 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 to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:
training bool

Boolean represents whether this module is in training or evaluation mode.

n_layers[source]
use_encoder[source]
relu[source]
convs[source]
forward(graph, x)[source]
class spateo.external.CAST.model.model_GCNII.GCN(in_dim: int, encoder_dim: int, n_layers: int, use_encoder=False)[source]

Bases: 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 to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:
training bool

Boolean represents whether this module is in training or evaluation mode.

n_layers[source]
use_encoder[source]
relu[source]
convs[source]
forward(graph, x)[source]
class spateo.external.CAST.model.model_GCNII.CCA_SSG(in_dim, encoder_dim, n_layers, backbone='GCNII', alpha=None, lambda_=None, use_encoder=False)[source]

Bases: 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 to(), etc.

Note

As per the example above, an __init__() call to the parent class must be made before assignment on the child.

Variables:
training bool

Boolean represents whether this module is in training or evaluation mode.

get_embedding(graph, feat)[source]
forward(graph1, feat1, graph2, feat2)[source]