Comments (2)
My bad, that specific comment was leftover from the internal version of the file - removed now.
Currently, if you want to see the architecture for a given policy, you should load the .npz
file for that policy and extract it from there:
policy_dict = dict(np.load(policy_path))
policy_fn_and_args_raw = pickle.loads(policy_dict['policy_fn_and_args'])
policy_args = policy_fn_and_args_raw['args'] # this contains the arguments fed in to the policy class
network_spec = policy_args['network_spec'] # this contains the network architecture
print(network_spec)
I believe all of the policies we provide have the same architecture we describe in the paper.
from multi-agent-emergence-environments.
Just to make it easier for others (since the code depends on an old gym version and the paper is somewhat underspecified), here's the json for hide_and_seek_full
:
[
{
"activation": "relu",
"filters": 9,
"kernel_size": 3,
"layer_type": "circ_conv1d",
"nodes_in": ["lidar"],
"nodes_out": ["lidar"]
},
{
"layer_type": "flatten_outer",
"nodes_in": ["lidar"],
"nodes_out": ["lidar"]
},
{
"layer_type": "concat",
"nodes_in": ["main", "lidar"],
"nodes_out": ["main"]
},
{
"layer_type": "concat",
"nodes_in": ["main", "agent_qpos_qvel"],
"nodes_out": ["agent_qpos_qvel"]
},
{
"layer_type": "concat",
"nodes_in": ["main", "box_obs"],
"nodes_out": ["box_obs"]
},
{
"layer_type": "concat",
"nodes_in": ["main", "ramp_obs"],
"nodes_out": ["ramp_obs"]
},
{
"activation": "relu",
"layer_type": "dense",
"nodes_in": ["agent_qpos_qvel", "box_obs", "ramp_obs", "main"],
"nodes_out": ["agent_qpos_qvel", "box_obs", "ramp_obs", "main"],
"units": 128
},
{
"layer_type": "entity_concat",
"mask_out": "objects_mask",
"masks_in": ["mask_aa_obs", "mask_ab_obs", "mask_ar_obs", None],
"nodes_in": ["agent_qpos_qvel", "box_obs", "ramp_obs", "main"],
"nodes_out": ["objects"]
},
{
"heads": 4,
"layer_norm": True,
"layer_type": "residual_sa_block",
"mask": "objects_mask",
"n_embd": 128,
"n_mlp": 1,
"nodes_in": ["objects"],
"nodes_out": ["objects"],
"post_sa_layer_norm": True
},
{
"layer_type": "entity_pooling",
"mask": "objects_mask",
"nodes_in": ["objects"],
"nodes_out": ["objects_pooled"]
},
{
"layer_type": "concat",
"nodes_in": ["main", "objects_pooled"],
"nodes_out": ["main"]
},
{ "layer_type": "layernorm" },
{ "activation": "relu", "layer_type": "dense", "units": 256 },
{ "layer_type": "layernorm" },
{ "layer_type": "lstm", "units": 256 },
{ "layer_type": "layernorm" }
]
script:
import numpy as np
import pickle
from pprint import pprint
policy_path = "examples/hide_and_seek_full.npz"
policy_dict = dict(np.load(policy_path))
policy_fn_and_args_raw = pickle.loads(policy_dict['policy_fn_and_args'])
policy_args = policy_fn_and_args_raw['args'] # this contains the arguments fed in to the policy class
network_spec = policy_args['network_spec'] # this contains the network architecture
pprint(network_spec)
from multi-agent-emergence-environments.
Related Issues (20)
- ModuleNotFoundError: No module named 'gym.spaces.dict_space' HOT 2
- Jsonnet error when unrolling policy HOT 2
- How to training agents HOT 2
- Observation parameters
- How to determine successful installation?
- sorry, Delete this issue,please
- It stopped in "Successfully opened dynamic library libcuda.so.1" HOT 1
- A
- Selling Out To Microsoft!!! MAJOR ISSUE...
- an ERROR was found!!
- Supporting project for everyone who wants to work with multi-agent-emergence-environments HOT 1
- How to run this project ?
- Where is the Leaderboard on this Env? Which is the SOTA algorithm?
- How do i solve this error ? No module named 'mae_envs' HOT 1
- Is there any memory requirement of running this project?
- [Suggestion] Switch to a free physics engine HOT 3
- gym.error.DoubleWrapperError: Attempted to double wrap with Wrapper: AgentGeomObsMask2D HOT 2
- Error when running the four environment files of multi-agent-emergence-environments
- Error when loading pre-trained policy HOT 1
- Can anyone reproduce the hide-and-seek training code for this environment? 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 multi-agent-emergence-environments.