Comments (5)
Hello! Can you show me what your inference function looks like? Or some kind of simplified repro?
from brax.
hi,
i just tested it with your training demo (https://colab.research.google.com/github/google/brax/blob/main/notebooks/training.ipynb) . Just add a last code-cell and add:
from brax.io import export
export.to_tf_model( "/content/model/", inference_fn, params, state.obs, state.rng)
then you get the error message
from brax.
tried with new 0.0.4 and original reacher env and training.ipynb, but now it complains about unexpected keyword use_v2 ? Here is the output
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
WARNING:tensorflow:Mapping types may not work well with tf.nest. Prefer using MutableMapping for <class 'flax.core.frozen_dict.FrozenDict'>
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-e53e63964dd5> in <module>()
1 from brax.io import export
----> 2 export.to_tf_model( "/content/model/", inference_fn, params, state.obs, state.rng)
29 frames
/usr/local/lib/python3.7/dist-packages/jax/experimental/jax2tf/jax2tf.py in _dot_general(lhs, rhs, dimension_numbers, precision, preferred_element_type, _in_avals, _out_aval)
1617 precision_config_proto,
1618 preferred_element_type=preferred_element_type,
-> 1619 use_v2=True)
1620 return res
1621
TypeError: dot_general() got an unexpected keyword argument 'use_v2'
from brax.
with version 0.0.5 is use this statement (only state.rng to rng)
from brax.io import export
export.to_tf_model( "/content/model/", inference_fn, params, state.obs, rng)
but i also returns
TypeError: dot_general() got an unexpected keyword argument 'use_v2'
from brax.
OK, this should be fixed now in 7229ee9. Tensorflow does indeed not like FrozenDict, so in this commit we strip them out.
from brax.
Related Issues (20)
- Training Quadruped needs to be more stable HOT 1
- Apply external force to the agent HOT 2
- Discrepancy in Observation Dimension for Humanoid Environment HOT 2
- How do I load a pre-trained model? HOT 1
- Inconsistency in solved return for Humanoid environment HOT 1
- Manually Set Initial Pose of Agent in the Reset Function HOT 1
- Mesh-Mesh Collision Problems HOT 1
- gradient on trajectory vs sum of gradients on 1 step transitions. HOT 1
- Reacher Task and AutoResetWrapper HOT 1
- Programatic Action Specifications HOT 1
- Subsume part of System inside State; EDIT: Or add Options to reset HOT 11
- MjxEnv no where to be found HOT 2
- Broken links on Github's brax's main page HOT 2
- [MJX] Model loading errors in `brax.io`, for features supported by MJX HOT 1
- Rendering an image with brax.io.image HOT 6
- Dump to json fails if mj model contains no meshes HOT 2
- Collision of robot with solid object HOT 1
- How to access parameter values for each time-step with callback function policy_param? HOT 1
- Different behavior from gym.Mujoco: the walker body penetrate the ground HOT 1
- ValueError: vmap got inconsistent sizes for array axes to be mapped 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 brax.