From 06be19a4d93a45ec0ebd9de9d21ddcefb7969961 Mon Sep 17 00:00:00 2001 From: jdc Date: Tue, 8 Nov 2022 15:15:41 -0500 Subject: [PATCH] - --- .../library/compositions/autodiffcomposition.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/psyneulink/library/compositions/autodiffcomposition.py b/psyneulink/library/compositions/autodiffcomposition.py index 9dd3ec61d9f..1dfbdce4a33 100644 --- a/psyneulink/library/compositions/autodiffcomposition.py +++ b/psyneulink/library/compositions/autodiffcomposition.py @@ -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.") @@ -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.")