Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgayoso committed Feb 24, 2021
1 parent 2f86a20 commit c39c76c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mypackage/_mymodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
class MyModel(VAEMixin, UnsupervisedTrainingMixin, BaseModelClass):
"""
Skeleton for an scvi-tools model.
Please use this skeleton to create new models.
Parameters
----------
adata
Expand Down
2 changes: 0 additions & 2 deletions mypackage/_mymodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class MyModule(BaseModuleClass):
Number of input genes
n_batch
Number of batches, if 0, no batch correction is performed.
n_labels
Number of labels
n_hidden
Number of nodes per hidden layer
n_latent
Expand Down
1 change: 1 addition & 0 deletions mypackage/_mypyromodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def train(
train_size=train_size,
validation_size=validation_size,
batch_size=batch_size,
use_gpu=use_gpu,
)
training_plan = PyroTrainingPlan(self.module, **plan_kwargs)
runner = TrainRunner(
Expand Down
20 changes: 19 additions & 1 deletion mypackage/_mypyromodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@


class MyPyroModule(PyroBaseModuleClass):
def __init__(self, n_input, n_latent, n_hidden, n_layers):
"""
Skeleton Variational auto-encoder Pyro model.
Here we implement a basic version of scVI's underlying VAE [Lopez18]_.
This implementation is for instructional purposes only.
Parameters
----------
n_input
Number of input genes
n_latent
Dimensionality of the latent space
n_hidden
Number of nodes per hidden layer
n_layers
Number of hidden layers used for encoder and decoder NNs
"""

def __init__(self, n_input: int, n_latent: int, n_hidden: int, n_layers: int):

super().__init__()
self.n_input = n_input
Expand Down

0 comments on commit c39c76c

Please sign in to comment.