Model
Embedding model for gtfs2vec.
This module contains embedding model from gtfs2vec paper [1].
References
¶
Bases: Model
Autoencoder based embedding model for gtfs2vec.
PARAMETER | DESCRIPTION |
---|---|
n_features |
Number of features.
TYPE:
|
n_hidden |
Number of hidden units. Defaults to 48.
TYPE:
|
n_embed |
Embedding size. Defaults to 64.
TYPE:
|
Source code in srai/embedders/gtfs2vec/model.py
¶
Get model config.
Source code in srai/embedders/_base.py
¶
Save the model to a directory.
PARAMETER | DESCRIPTION |
---|---|
path |
Path to the directory.
TYPE:
|
¶
classmethod
Load model from a file.
PARAMETER | DESCRIPTION |
---|---|
path |
Path to the file.
TYPE:
|
**kwargs |
Additional kwargs to pass to the model constructor.
TYPE:
|
Source code in srai/embedders/_base.py
¶
Forward pass.
PARAMETER | DESCRIPTION |
---|---|
x |
Input tensor.
TYPE:
|
¶
Training step.
PARAMETER | DESCRIPTION |
---|---|
batch |
Batch.
TYPE:
|
batch_idx |
Batch index.
TYPE:
|