Comments (7)
For starters, which version of Python are you using (Python 3 should be fine) and what version of PyTorch (v0.3.0 or v0.3.1 should be fine)?
from rainbow.
Hi Kaixhin,
I am using windows 10 Python 3.5, PyTorch version may be 0.4.0 which is complied by https://github.com/peterjc123/pytorch-scripts
Thanks for your help.
from rainbow.
Not really sure what the problem is. Can you replace line 53 in env.py
with return torch.stack(list(self.state_buffer), 0)
to see if that works? If it doesn't can you print out self.state_buffer
and paste the result here?
from rainbow.
With "list(self.state_buffer)", it does work.
self.state_buffer: deque([
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
... ?? ...
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
[torch.cuda.FloatTensor of size (84,84) (GPU 0)]
,
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
... ?? ...
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
[torch.cuda.FloatTensor of size (84,84) (GPU 0)]
,
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
... ?? ...
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
0 0 0 ... 0 0 0
[torch.cuda.FloatTensor of size (84,84) (GPU 0)]
,
0.0000 0.0000 0.0000 ... 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 ... 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 ... 0.0000 0.0000 0.0000
... ?? ...
0.3098 0.3098 0.3098 ... 0.3098 0.3098 0.3098
0.3098 0.3098 0.3098 ... 0.3098 0.3098 0.3098
0.3098 0.3098 0.3098 ... 0.3098 0.3098 0.3098
[torch.cuda.FloatTensor of size (84,84) (GPU 0)]
], maxlen=4)
(84,84) (GPU 0)]
], maxlen=4)
What's more, another exception occurs:
Traceback (most recent call last):
File "main.py", line 103, in
next_state, reward, done = env.step(action) # Step
File "C:\Users\simon\Desktop\DQN\RL-AlphaGO\Rainbow-master\env.py", line 63, in step
reward += self.ale.act(self.actions.get(action))
File "C:\Program Files\Python35\lib\site-packages\atari_py\ale_python_interface.py", line 159, in act
return ale_lib.act(self.obj, int(action))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
from rainbow.
......
self.actions.get(action): 4
self.actions.get(action): 4
self.actions.get(action): 4
self.actions.get(action): 4
self.actions.get(action): 1
self.actions.get(action): 1
self.actions.get(action): 1
self.actions.get(action): 1
self.actions.get(action): None
Traceback (most recent call last):
File "main.py", line 103, in
next_state, reward, done = env.step(action) # Step
File "C:\Users\simon\Desktop\DQN\RL-AlphaGO\Rainbow-master\env.py", line 63, in step
reward += self.ale.act(self.actions.get(action))
File "C:\Program Files\Python35\lib\site-packages\atari_py\ale_python_interface.py", line 159, in act
return ale_lib.act(self.obj, int(action))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
from rainbow.
That's a different problem, so could you open a separate issue for that (so I can track this specific problem separately)?
Before I close this issue I think there may be a bigger problem you have with PyTorch. Try running the following code, and if you get an error then you should post it as a PyTorch issue.
from collections import deque
import torch
x = deque([torch.ones(3), torch.ones(3)])
torch.stack(x)
from rainbow.
from collections import deque
import torch
x = deque([torch.ones(3), torch.ones(3)])
torch.stack(x)
Traceback (most recent call last):
File "", line 1, in
TypeError: stack(): argument 'tensors' (position 1) must be tuple of Tensors, not collections.deque
torch.stack(list(x))
1 1 1
1 1 1
[torch.FloatTensor of size (2,3)]
Thanks. I will post it as a PyTorch issue.
from rainbow.
Related Issues (20)
- Infinite loop in ReplayMemory._get_sample_from_segment HOT 1
- Noob Question : Need help running the code. It seems to be running for forever. HOT 1
- rainbow for multiagent setting HOT 1
- Policy and reward function HOT 4
- ploting the result HOT 1
- To run a demo HOT 2
- disable env.reset() after every episode HOT 5
- --learn-start HOT 2
- Delayed reward HOT 1
- load a model HOT 1
- Explanation of Q statistics in plots for "val_mem"? HOT 1
- [question] Training speed HOT 3
- Running Rainbow on a Cluster HOT 1
- IndexError: index 262141 is out of bounds for axis 0 with size 231071 HOT 2
- Evaluate the pretrained model HOT 1
- The problem about training with GPU HOT 1
- Stuck in memory._retrieve when batch size > 32 HOT 1
- A problem about one game in ALE cannot be trained HOT 1
- Montezuma's revenge - has this been tried using this codebase? HOT 2
- Data Effiecient Rainbow with Skiing does not work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rainbow.