Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem regarding testing the model on kitti dataset #19

Closed
SimonSongg opened this issue Feb 10, 2021 · 4 comments
Closed

A problem regarding testing the model on kitti dataset #19

SimonSongg opened this issue Feb 10, 2021 · 4 comments

Comments

@SimonSongg
Copy link

Hello, I try to run "run_example.py" to test it on the image in the test dataset and it works very well. Great work!! But when I tried to run "test.py", an error appeared.

---------- Networks initialized -------------
[Network RoadSeg] Total number of parameters : 201.325 M

Traceback (most recent call last):
File "test.py", line 31, in
for i, data in enumerate(dataset):
File "C:\Users\sf995\iCloudDrive\DL\SNE-RoadSeg\data_init_.py", line 71, in iter
for i, data in enumerate(self.dataloader):
File "D:\anaconda\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 193, in iter
return _DataLoaderIter(self)
File "D:\anaconda\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 469, in init
w.start()
File "D:\anaconda\envs\pytorch\lib\multiprocessing\process.py", line 112, in start
self._popen = self._Popen(self)
File "D:\anaconda\envs\pytorch\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\anaconda\envs\pytorch\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\anaconda\envs\pytorch\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)
File "D:\anaconda\envs\pytorch\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'CustomDatasetDataLoader.initialize..'

(pytorch) C:\Users\sf995\iCloudDrive\DL\SNE-RoadSeg>Traceback (most recent call last):
File "", line 1, in
File "D:\anaconda\envs\pytorch\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "D:\anaconda\envs\pytorch\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

Seems like it is about the lambda function. Could you help me?

@hlwang1124
Copy link
Owner

Hi, @SimonSongg .
It seems like a problem on Windows. I have found two possible solutions. One is to replace the lambda function in Line62 of data/__init__.py, the other one is to set num_workers=0. Hope this can help you address this problem.

@SimonSongg
Copy link
Author

Many thanks! Problem solved with a new errror xD. I will figure it out. Thank you again. Happy new year.

@SimonSongg
Copy link
Author

Hi, @SimonSongg .
It seems like a problem on Windows. I have found two possible solutions. One is to replace the lambda function in Line62 of data/__init__.py, the other one is to set num_workers=0. Hope this can help you address this problem.

Just completely solved, results from the path format difference between linux and windows. Nice work! Thank you again for your reply.

@hlwang1124
Copy link
Owner

Glad to hear that! Happy Chinese New Year!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants