marload / deeprl-tensorflow2 Goto Github PK
View Code? Open in Web Editor NEW๐ Simple implementations of various popular Deep Reinforcement Learning algorithms using TensorFlow2
License: Apache License 2.0
๐ Simple implementations of various popular Deep Reinforcement Learning algorithms using TensorFlow2
License: Apache License 2.0
DeepRL-TensorFlow2/PPO/PPO_Discrete.py
Lines 151 to 154 in 876266d
DeepRL-TensorFlow2/PPO/PPO_Continuous.py
Lines 167 to 170 in 876266d
In PPO_Discrete
each reward is multiplied by 0.01
and in PPO_Continuous
reward is also modified. I don't understand why do these modification, what does these modification do?
In the Actor net, It seems that from_logit should be set to False in tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True) as you added a softmax in the last layer:)
'Viewer' object has no attribute 'isopen'
File "E:\anaconda\envs\tf2\lib\site-packages\gym\envs\classic_control\rendering.py", line 81, in close
AttributeError: 'Viewer' object has no attribute 'isopen'
Traceback (most recent call last):
File "E:\anaconda\envs\tf2\lib\site-packages\gym\envs\classic_control\rendering.py", line 165, in del
if self.isopen and sys.meta_path:
if self.isopen and sys.meta_path:
if self.isopen and sys.meta_path:
self.close()
File "E:\anaconda\envs\tf2\lib\site-packages\gym\envs\classic_control\rendering.py", line 165, in del
if self.isopen and sys.meta_path:
AttributeError: 'Viewer' object has no attribute 'isopen'
AttributeError: 'Viewer' object has no attribute 'isopen'
self.close()
File "E:\anaconda\envs\tf2\lib\site-packages\gym\envs\classic_control\rendering.py", line 81, in close
AttributeError: 'Viewer' object has no attribute 'isopen'
AttributeError: 'Viewer' object has no attribute 'isopen'
if self.isopen and sys.meta_path:
File "E:\anaconda\envs\tf2\lib\site-packages\gym\envs\classic_control\rendering.py", line 81, in close
AttributeError: 'Viewer' object has no attribute 'isopen'
if self.isopen and sys.meta_path:
AttributeError: 'Viewer' object has no attribute 'isopen'
l don't konw how to fix it
..
Hi @marload,
Great repository you have here ๐! I am running your DQN script and I am trying to solve CartPole
with it (consistently get >200
score).
I ran the script with the default parameters, but the agent is having trouble learning a successful policy. All I get is fluctuating scores between 10 and 100 for the first 800 episodes I trained it on. There was one episode with >200 but it was early in the training and having in mind that eps
would have been very high at this point I think this must have been due to chance.
So my question is - if you have trained a successful agent with this algorithm can you provide me with "working" parameters? Or maybe DQN is just unstable in nature and I should run the script a couple of more times and hope for something better?
I have not reviewed the code thoroughly, because I wanted to see it working first, but at first glance, it looks clean and simple.
Anyway, thanks for posting it on Reddit, not sure why it was deleted. I hope I can learn a thing or two from it since I am working on something similar at the moment. ๐
Have a great day!
The issue is not DQN specific, it's the only module (DQN_Discrete.py
) which I tried to run on my mbp and on google colab. It runs okay, but both runs seem to take almost the same time. To activate the GPU, I added the following lines to main()
:
physical_devices = tf.config.experimental.list_physical_devices('GPU')
if len(physical_devices) > 0:
tf.config.experimental.set_memory_growth(physical_devices[0], True)
Update:
wandb report shows 0% GPU utilization, you can check the graphs after a few minutes from starting the training here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.