fix a bug in load_weights()
@@ -779,13 +779,10 @@ class Network(Layer):
server_sep = get_server_path_sep(self.conn)
- if os.path.isfile(path):
if server_sep in path:
dir_name, file_name = path.rsplit(server_sep, 1)
else:
file_name = path
- else:
- raise DLPyError('The specified file does not exist: ' + path)
if file_name.lower().endswith('.sashdat'):
self.load_weights_from_table(path)
