Comments (2)
Hi,
Thanks for using evojax and the question.
Evojax has no knowledge of the differentiability of the policy network, it simply optimizes what is given.
While I'm not very certain about your usage, the following method may help.
# Only ask the solver for the parameters that belong to the non-diff operations.
solver = NeuroEvolutionAlgo(param_size=non_diff_param_size)
# Define the policy to contain both diff and non-diff operations.
class AwesomePolicy:
def __init__(self):
# policy network definition and init
# Save the part that are differentiable.
self.diff_params = xxxxx
def reset():
# Save the differentiable params in the policy state.
return PolicyState(params=self.diff_params)
def get_action(self, params, p_state):
# The "params" parameter is coming from the solver, they belong to the non-diff ops.
load_diff_params_to_model(p_state.params)
load_non_diff_params(params)
# Model inference
Let me know if that works or when you have further questions.
from evojax.
Thank you! I will experiment on this, and not to clutter your issues close for now, in case of further problems will reopen.
And once more time thanks for publishing this fantastic work !!
from evojax.
Related Issues (20)
- Minor issue with GIF at the end of the Abstract Paintings notebook 1 HOT 2
- Evaluating brax environments other than brax-ant. Terminates with error. HOT 5
- Reproducing benchmark scores HOT 2
- Look into Problems with Brax HOT 2
- Evolving topology of NN HOT 3
- high dimensional parametric search HOT 5
- AssertionError for OpenES HOT 4
- A GNN-based Meta-Learning Method for Sparse Portfolio Optimization HOT 3
- How can I continue training from previously saved parameters? HOT 1
- Issue with BatchNorm layer HOT 1
- Reinitialization HOT 1
- Multi-Agent RL Environment for CrowdSim, Predator-Prey, and Army HOT 2
- Question: Requirement on vec. task
- [Discussion] Sequencing side-effects in JAX
- Can't execute Brax notebook
- OpenAI Gym Integration
- How to use GPU for computing HOT 1
- How to design custom Seq2seq model by evojax?
- SlimeVolley initial ball velocity is incorrect
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 evojax.