topobench.nn.encoders.base module#
Abstract class for feature encoders.
- class AbstractFeatureEncoder#
Bases:
ModuleAbstract class to define a custom feature encoder.
- __init__()#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- abstract forward(data)#
Forward pass of the feature encoder model.
- Parameters:
- datatorch_geometric.data.Data
Input data object which should contain x features.
- abstractmethod(funcobj)#
A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract methods are overridden. The abstract methods can be called using any of the normal ‘super’ call mechanisms. abstractmethod() may be used to declare abstract methods for properties and descriptors.
Usage:
- class C(metaclass=ABCMeta):
@abstractmethod def my_abstract_method(self, …):
…