Comments (2)
from slm-lab.
Hi @vvivek921, glad that you're enjoying the book! This is definitely the right place to ask, and it would also help other readers/users who might have the same question.
For your question, loss could start out being underestimated, hence the low initial value, since it depends on the initial values of the policy network which yields log_probs
. If the network is still learning, the loss will keep changing as a result of minimizing and correcting (so it may increase if it's initial value was underestimated), as well as because of the changing returns, until it eventually converges to a relatively stable final value.
This is also an interesting observation: in deep RL, the loss curve isn't always reliable for reasons like this, and it is partly why debugging can be tricky! Granted, losses in RL is quite different than losses in supervised learning.
If you look at the loss graph (inside the ./data/{your_experiment_folder}/graph/
folder), you would see graph that is quite noisy, like the one below (which has a different scale because it's using a different advantage baseline). It is especially harder to tell also because the environment is so simple and can be solved in such a short timescale.
For a harder environment which requires a longer time scale to solve, such as an Atari game, we can more clearly observe the more pronounced changes (decreasing) of the loss over a much longer time, like the one below (PPO on Atari Pong, max total reward = 21) shown with its return graph. Note that even here it still increases slightly toward the end.
Hope this helps!
from slm-lab.
Related Issues (20)
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED on Pong HOT 1
- Cannot open shared object file: No such file or directory when running demo HOT 2
- Book branch problem, need your help HOT 2
- Installation on MacOs 11.6.1 fails HOT 2
- IndexError: list index out of range
- ModuleNotFoundError: No module named 'cv2' HOT 4
- subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128. HOT 4
- How to add a non-gym envrinment? HOT 6
- I have encounter one problem, maybe a bug. HOT 1
- How to run the code on multiple GPUs? HOT 1
- how to improve the convergence performance of training loss?
- python setup.py test
- `optimizer.step()` before `lr_scheduler.step()` Warning Occurred
- Docker build fails on environment.yml installation HOT 1
- How to add a custom gym environment in json spec file.
- Exception: pyglet 2.0.0 requires Python 3.8 or newer HOT 1
- Docker build failed HOT 2
- Compatibility to M1 Mac HOT 1
- Ubuntu 20.04 no longer works
- Installation dependencies issue with more-itertools and pyglet and how to solve it HOT 1
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 slm-lab.