mseitzer / pytorch-fid

Compute FID scores with PyTorch.
Apache License 2.0
3.22k stars 497 forks source link

AttributeError: module 'os' has no attribute 'sched_getaffinity' #84

Closed InceZ1 closed 1 year ago

InceZ1 commented 2 years ago

(FID) PS E:\pytorch-fid-master> python -m pytorch_fid datasets/fid/fake datasets/fid/real Traceback (most recent call last): File "D:\Anaconda\envs\FID\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "D:\Anaconda\envs\FID\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Anaconda\envs\FID\lib\site-packages\pytorch_fid\__main__.py", line 3, in <module> pytorch_fid.fid_score.main() File "D:\Anaconda\envs\FID\lib\site-packages\pytorch_fid\fid_score.py", line 274, in main num_avail_cpus = len(os.sched_getaffinity(0)) AttributeError: module 'os' has no attribute 'sched_getaffinity' I can't solve the problem, please help me, thx.

jeremiahscully commented 2 years ago

Are you trying to run this program off windows? if so windows does not support sched_getaffinity and is only supported on linux. see : https://github.com/nielstron/quantulum3/issues/124

Hope this helps

InceZ1 commented 2 years ago

Are you trying to run this program off windows? if so windows does not support sched_getaffinity and is only supported on linux. see : nielstron/quantulum3#124

Hope this helps Yes, I run it off windows.Thanks!

xyimaging commented 2 years ago

just remove it or set the num_worker = 0 image