Comments (5)
I have currently made these changes in my vscode, however I am not sure of the current syntax errors, since I dont know how to compile the entire mlpack library with my modifications.
I'd suggest you build mlpack main branch first. If you face any problems, feel free to open an issue. After you build mlpack, you should be able to follow RL tutorials
Then, add your modifications in a separate branch and build mlpack again to make sure the changes are working as expected.
is there a way I can give you the specific .hpp files where I have made the changes? or should I put a pull request so that my differences wrt the original code are visible?
You should open a PR.
from mlpack.
(This is my first Open Source Attempt to help, I apologise if I have broken any protocol, and am open to suggestions to improve)
I have tried to implement the template as-
template <
typename EnvironmentType,
typename QNetworkType= decltype(std::declval().GetDefaultQNetwork(),
typename PolicyNetworkType= decltype(std::declval().GetDefaultPolicyNetwork()),
typename UpdaterType = AdamUpdate,
typename ReplayType = RandomReplay
and overloaded the TD3(ReplayType& replayMethod); constructor method in td3.hpp
in td3_impl.hpp, i have expanded upon the constructor
template <
typename EnvironmentType,
typename QNetworkType,
typename PolicyNetworkType,
typename UpdaterType,
typename ReplayType
TD3<
EnvironmentType,
QNetworkType,
PolicyNetworkType,
UpdaterType,
ReplayType
::TD3(ReplayType& replayMethod):
config(GetDefaultConfig()),
learningQ1Network(GetDefaultQNetwork()),
policyNetwork(GetDefaultPolicy()),
replayMethod(replayMethod),
//rest of the method remains the same
in training_config.hpp, i have implemented the GetDefaultConfig() method-
TrainingConfig GetDefaultConfig() const{
TrainingConfig config;
config.StepSize() = 0.01;
config.TargetNetworkSyncInterval() = 1;
config.UpdateInterval() = 3;
config.Rho() = 0.001;
}
and similarly for the other methods as well
Qlearning GetDefaultQNetwork() const{
FFN<EmptyLoss, GaussianInitialization>
qNetwork(EmptyLoss(), GaussianInitialization(0, 0.1));
QNetwork.Add(new Linear(128));
QNetwork.Add(new ReLU());
QNetwork.Add(new Linear(1));
}
GreedyPolicy GetDefaultPolicy() const{
FFN<EmptyLoss, GaussianInitialization>
policyNetwork(EmptyLoss(), GaussianInitialization(0, 0.1));
policyNetwork.Add(new Linear(128));
policyNetwork.Add(new ReLU());
policyNetwork.Add(new Linear(1));
policyNetwork.Add(new TanH());
}
I have currently made these changes in my vscode, however I am not sure of the current syntax errors, since I dont know how to compile the entire mlpack library with my modifications.
is there a way I can give you the specific .hpp files where I have made the changes? or should I put a pull request so that my differences wrt the original code are visible?
from mlpack.
This can also be done by using Wrapper Function or Class: A wrapper function or class that creates a TD3 agent with default parameters. Would be better right . It is safer than modifying the TD3 class itself. Will be more simple and elegant
from mlpack.
Hey @5advaith
I am not familiar with this approach but could you open a PR where you implement it for just one reinforcement learning agent of your choice as a PoC?
cc: @zoq
from mlpack.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍
from mlpack.
Related Issues (20)
- Fatal error occurred when calling mlpack.bayesian_linear_regression() HOT 2
- Move the Wiki developer section to the new docs developer page
- stb_image_write warning while compiling HOT 1
- Benchmark to replace the transform functions HOT 15
- Can't train a model having bias addition layer Add() HOT 8
- Reverse Convolution? HOT 6
- Documentation issue
- [R] - `verbose` argument has no effect HOT 1
- Get rid of `arma::fill::zeros` when we upgrade the minimum armadillo version HOT 5
- Document `internal_compact::` name space for `arma::fill` HOT 2
- [R] - Global option for 'verbose' argument HOT 5
- Add `.prepare` script to have r-universe automatically build new nightlies HOT 1
- bfd.h:35:2: error: #error config.h must be included before this header HOT 4
- Any ideas about Random Forest regressor? HOT 1
- Switch from `-j 2` to `-j ${nproc}` HOT 2
- dimensionality mismatch: Decision Tree CLI with both -t and -T specified
- [R] - Should the returning model object gain a class?
- NumPy 2.0 support
- [R] Switch `sprintf` to `snprintf` HOT 4
- Physics-Informed Neural Network possible with MLPack? 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 mlpack.