Transfer-Learning-Library icon indicating copy to clipboard operation
Transfer-Learning-Library copied to clipboard

运行\examples\domain_adaptation\partial_domain_adaptation报错

Open zhy12345655 opened this issue 1 year ago • 1 comments

报错内容如下: <class 'tllib.vision.datasets.partial.partial..PartialDataset'> Traceback (most recent call last): File "dann.py", line 261, in main(args) File "dann.py", line 70, in main train_target_iter = ForeverDataIterator(train_target_loader) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\site-packages\tllib-0.4-py3.8.egg\tllib\utils\data.py", line 45, in init File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\site-packages\torch\utils\data\dataloader.py", line 352, in iter return self._get_iterator() File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\site-packages\torch\utils\data\dataloader.py", line 801, in init w.start() File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\context.py", line 327, in _Popen return Popen(process_obj) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'partial..PartialDataset' (pytorch_transfer_1.7.1) PS D:\code\Transfer-Learning-Library-master\examples\domain_adaptation\partial_domain_adaptation> Traceback (most recen t call last): File "", line 1, in File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "D:\soft\anaconda3\envs\pytorch_transfer_1.7.1\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input

zhy12345655 avatar Jan 13 '24 08:01 zhy12345655

请问是直接运行我们的代码吗,还是做了一些修改之后,看样子像是加了Pytorch Lightning之类的框架之后跑的

thucbx99 avatar Mar 15 '24 03:03 thucbx99