-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
127 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from importlib.metadata import version | ||
|
||
from . import pl, pp, tl | ||
from . import model | ||
|
||
__all__ = ["pl", "pp", "tl"] | ||
__all__ = ["model"] | ||
|
||
__version__ = version("devVI") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .devvi_model import BasicClass, basic_plot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# import lightning as L | ||
# import torch | ||
# import torch.nn.functional as F | ||
# from torch.utils.data import DataLoader | ||
|
||
from torch import nn | ||
|
||
|
||
def basic_plot(adata: nn.Module) -> int: | ||
"""Generate a basic plot for an AnnData object. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
Returns | ||
------- | ||
Some integer value. | ||
""" | ||
print("Import matplotlib and implement a plotting function here.") | ||
return 0 | ||
|
||
|
||
class Encoder(nn.Module): | ||
"""A basic class. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.l1 = nn.Sequential(nn.Linear(28 * 28, 64), nn.ReLU(), nn.Linear(64, 3)) | ||
|
||
def forward(self, x): | ||
"""Generate a basic plot for an AnnData object. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
Returns | ||
------- | ||
Some integer value. | ||
""" | ||
return self.l1(x) | ||
|
||
|
||
class Decoder(nn.Module): | ||
"""A basic class. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.l1 = nn.Sequential(nn.Linear(3, 64), nn.ReLU(), nn.Linear(64, 28 * 28)) | ||
|
||
def forward(self, x): | ||
"""Generate a basic plot for an AnnData object. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
Returns | ||
------- | ||
Some integer value. | ||
""" | ||
return self.l1(x) | ||
|
||
|
||
class BasicClass: | ||
"""A basic class. | ||
Parameters | ||
---------- | ||
adata | ||
The AnnData object to preprocess. | ||
""" | ||
|
||
my_attribute: str = "Some attribute." | ||
my_other_attribute: int = 0 | ||
|
||
def __init__(self, adata: nn.Module): | ||
print("Implement a class here.") | ||
|
||
def my_method(self, param: int) -> int: | ||
"""A basic method. | ||
Parameters | ||
---------- | ||
param | ||
A parameter. | ||
Returns | ||
------- | ||
Some integer value. | ||
""" | ||
print("Implement a method here.") | ||
return 0 | ||
|
||
def my_other_method(self, param: str) -> str: | ||
"""Another basic method. | ||
Parameters | ||
---------- | ||
param | ||
A parameter. | ||
Returns | ||
------- | ||
Some integer value. | ||
""" | ||
print("Implement a method here.") | ||
return "" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.