-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exposing groups, V,T,Rep, EMLP layers to __all__
- Loading branch information
Showing
7 changed files
with
63 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import importlib | ||
import pkgutil | ||
__all__ = [] | ||
for loader, module_name, is_pkg in pkgutil.walk_packages(__path__): | ||
module = importlib.import_module('.'+module_name,package=__name__) | ||
try: | ||
globals().update({k: getattr(module, k) for k in module.__all__}) | ||
__all__ += module.__all__ | ||
except AttributeError: continue | ||
# concatenate the __all__ from each of the submodules (expose to user) |
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,5 @@ | ||
from emlp.models import mlp | ||
from emlp.models import batchnorm | ||
__all__ = [] | ||
__all__ += mlp.__all__ | ||
__all__ += batchnorm.__all__ |
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
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,13 @@ | ||
# from .product_sum_reps import SumRep,DeferredSumRep,ProductRep,DeferredProductRep,DirectProduct | ||
# __all__=["SumRep","DeferredSumRep","ProductRep","DeferredProductRep","DirectProduct"] | ||
# __all__=["SumRep","DeferredSumRep","ProductRep","DeferredProductRep","DirectProduct"] | ||
import importlib | ||
import pkgutil | ||
__all__ = [] | ||
for loader, module_name, is_pkg in pkgutil.walk_packages(__path__): | ||
module = importlib.import_module('.'+module_name,package=__name__) | ||
try: | ||
globals().update({k: getattr(module, k) for k in module.__all__}) | ||
__all__ += module.__all__ | ||
except AttributeError: continue | ||
|
||
# concatenate __all__ from each of the modules |
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
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
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