Skip to content

Commit

Permalink
Adding kwargs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pseeth committed Aug 31, 2022
1 parent 97585ed commit 5ce9fa4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion audiotools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.1"
__version__ = "0.4.2"
from .core import AudioSignal, STFTParams, Meter, util
from . import metrics
from . import data
Expand Down
3 changes: 2 additions & 1 deletion audiotools/ml/layers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def load_from_folder(
folder: Path,
package: bool = True,
strict: bool = False,
**kwargs,
):
folder = Path(folder) / cls.__name__.lower()
model_pth = "package.pth" if package else "weights.pth"
Expand All @@ -158,6 +159,6 @@ def load_from_folder(
excluded = ["package.pth", "weights.pth"]
files = [x for x in folder.glob("*") if x.is_file() and x.name not in excluded]
for f in files:
extra_data[f.name] = torch.load(folder / f)
extra_data[f.name] = torch.load(folder / f, **kwargs)

return model, extra_data
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="audiotools",
version="0.4.1",
version="0.4.2",
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Education",
Expand Down

0 comments on commit 5ce9fa4

Please sign in to comment.