🦓 Module Zoo
Welcome to our module zoo, the place where we discuss all pre-defined modules and outline how they are mapped to logic programs.
All modules listed here are defined in the neuralogic.nn.module package, and their usage is quite similar to the usage
of regular rules. You can add them to your template via the += operator or add_module method, e.g.:
from neuralogic.nn.module import GCNConv
template += GCNConv(...)
# or
template.add_module(GCNConv(...))
Right after adding a module into a template, it is expanded into logic form - rules. This allows you to build upon pre-defined modules and create new variations by adding your own custom rules or just mixing modules together.
Pre-defined Modules
Module |
Edge formats |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module |
|
|---|---|
|
|
|
Transformer module |
|
|---|---|
|
|
|
|
|
Recurrent/Recursive module |
|
|---|---|
|
|
|
|
|
|
|
Attention module |
|
|---|---|
|
|
|
Pooling module |
|
|---|---|
|
|
|
|
|
|
|
Encoding module |
|
|---|---|
|
Module |
|
|---|---|
|
|
|
|
|