linnaeushuang / pensieve-pytorch

MIT License
27 stars 10 forks source link

some problem~~~plz #12

Open pangzhiyu opened 1 year ago

pangzhiyu commented 1 year ago

Thank you for your code! But I have some problem when I run the pensieve_torch.py

D:\Anaconda\envs\torch\python.exe D:/Pycode/1/pensieve-pytorch-master/pensieve_torch.py Process Process-2: Traceback (most recent call last): File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, self._kwargs) File "D:\Pycode\1\pensieve-pytorch-master\pensieve_torch.py", line 218, in agent bit_rate = net.actionSelect(state).cuda() AttributeError: 'int' object has no attribute 'cuda' Process Process-3: Traceback (most recent call last): File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, *self._kwargs) File "D:\Pycode\1\pensieve-pytorch-master\pensieve_torch.py", line 218, in agent bit_rate = net.actionSelect(state).cuda() AttributeError: 'int' object has no attribute 'cuda' Process Process-4: Traceback (most recent call last): File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 108, in run self._target(self._args, self._kwargs) File "D:\Pycode\1\pensieve-pytorch-master\pensieve_torch.py", line 218, in agent bit_rate = net.actionSelect(state).cuda() AttributeError: 'int' object has no attribute 'cuda' Process Process-5: Traceback (most recent call last): File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "D:\Anaconda\envs\torch\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "D:\Pycode\1\pensieve-pytorch-master\pensieve_torch.py", line 218, in agent bit_rate = net.actionSelect(state).cuda() AttributeError: 'int' object has no attribute 'cuda'

Chidu2000 commented 5 months ago

attach the state to cuda, no necessity of defining it the way you have done