def __new__(cls, *args, **kwargs):
if cls is Path:
cls = WindowsPath if os.name == 'nt' else PosixPath
self = cls._from_parts(args)
if type(self) == PosixPath:
cls = WindowsPath
self = cls._from_parts(args)
if not self._flavour.is_supported:
raise NotImplementedError("cannot instantiate %r on your system"
% (cls.__name__,))
return self
模型在linux训练后windows路径加载错误问题解决
最新推荐文章于 2024-05-09 20:43:47 发布