-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update __init__s to use __all__ and make all module functionality ava…
…ilable
- Loading branch information
belsten
authored and
belsten
committed
Nov 28, 2024
1 parent
a7286fb
commit 49fc383
Showing
2 changed files
with
53 additions
and
7 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,6 +1,42 @@ | ||
"Modules for sparse coding." | ||
from .models import SparseCoding | ||
from .inference import LCA, IHT, ISTA, LSM, MP, OMP, Vanilla, PyTorchOptimizer | ||
from .visualization import plot_dictionary, plot_patches | ||
from .priors import SpikeSlabPrior, L0Prior | ||
from .datasets import BarsDataset, FieldDataset | ||
from .dictionaries import ( | ||
load_dictionary_from_pickle, | ||
load_bars_dictionary, | ||
load_olshausen_dictionary, | ||
) | ||
|
||
from . import models | ||
from . import inference | ||
from . import visualization | ||
from . import priors | ||
__all__ = [ | ||
# Models | ||
"SparseCoding", | ||
|
||
# Inference | ||
"LCA", | ||
"IHT", | ||
"ISTA", | ||
"LSM", | ||
"MP", | ||
"OMP", | ||
"Vanilla", | ||
"PyTorchOptimizer", | ||
|
||
# Visualization | ||
"plot_dictionary", | ||
"plot_patches", | ||
|
||
# Priors | ||
"SpikeSlabPrior", | ||
"L0Prior", | ||
|
||
# Dictionaries | ||
"load_dictionary_from_pickle", | ||
"load_bars_dictionary", | ||
"load_olshausen_dictionary", | ||
|
||
# Datasets | ||
"BarsDataset", | ||
"FieldDataset", | ||
] |
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,2 +1,12 @@ | ||
from . import patch | ||
from . import whiten | ||
from .patch import sample_random_patches, patchify, quilt | ||
from .whiten import Whitener | ||
|
||
__all__ = [ | ||
# From patch module | ||
"sample_random_patches", | ||
"patchify", | ||
"quilt", | ||
|
||
# From whiten module | ||
"Whitener", | ||
] |