Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcpni committed Nov 8, 2022
1 parent 4df0276 commit 06be19a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions psyneulink/library/compositions/autodiffcomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,10 @@ def save(self, path:PosixPath=None, directory:str=None, filename:str=None, conte
else:
path = Path(os.getcwd())
if filename:
path = Path(path / filename)
# path = Path(path / filename)
path = Path(os.path.join(path / filename))
else:
path = Path(path / f'{self.name}_matrix_wts.pnl')
path = Path(os.path.join(path / f'{self.name}_matrix_wts.pnl'))
except IsADirectoryError:
raise AutodiffCompositionError(f"'{path}' (for saving weight matrices of ({self.name}) "
f"is not a legal path.")
Expand Down Expand Up @@ -675,9 +676,11 @@ def load(self, path:PosixPath=None, directory:str=None, filename:str=None, conte
else:
path = Path(os.getcwd())
if filename:
path = Path(path / filename)
# path = Path(path / filename)
path = Path(os.path.join(path / filename))
else:
path = Path(path / f'{self.name}_matrix_wts.pnl')
# path = Path(path / f'{self.name}_matrix_wts.pnl')
path = Path(os.path.join(path , f'{self.name}_matrix_wts.pnl'))
except IsADirectoryError:
raise AutodiffCompositionError(f"'{path}' (for saving weight matrices of ({self.name}) "
f"is not a legal path.")
Expand Down

0 comments on commit 06be19a

Please sign in to comment.