scvi.module.base.EmbeddingModuleMixin#
- class scvi.module.base.EmbeddingModuleMixin[source]#
Bases:
object
EXPERIMENTAL
Mixin class for initializing and using embeddings in a module.Notes
Lifecycle: experimental in v1.2.
Attributes table#
Dictionary of embeddings. |
Methods table#
|
Add an embedding to the module. |
|
Forward pass for an embedding. |
|
Get an embedding from the module. |
|
Initialize an embedding in the module. |
|
Remove an embedding from the module. |
Attributes#
Methods#
- EmbeddingModuleMixin.add_embedding(key, embedding, overwrite=False)[source]#
Add an embedding to the module.
- Return type:
- EmbeddingModuleMixin.compute_embedding(key, indices)[source]#
Forward pass for an embedding.
- Return type:
Tensor