Comments (4)
I found the problem.
print('Create agent.')
agnt = agent.Agent(config, env.obs_space, env.act_space, step)
dataset = iter(replay.dataset(**config.dataset))
train_agent = common.CarryOverState(agnt.train)
train_agent(next(dataset))
These train_agent calls are required before load the variables file.
Thanks
from dreamerv2.
Seems like you're just trying to load an incompatible checkpoint? That happens for example when you change the model size or try to change to an environment with different obs/act spaces as the agent was trained on.
from dreamerv2.
Hi Danijar,
I have double checked the obs/act spaces and I found one odd behavior: the action space was changed (by the dreamerv2) from Discrete(8) to Box(0., 1., (8,)). This is right?
I'm training with this code:
import gym
import dreamerv2.api as dv2
config = dv2.defaults.update({
'logdir': '~/logdir/trader',
'log_every': 300,
'train_every': 10,
'prefill': 1e3,
'actor_ent': 3e-3,
'loss_scales.kl': 1.0,
'discount': 0.99,
'eval_every': 300,
'replay': {'capacity': 2e3, 'ongoing': False, 'minlen': 10, 'maxlen': 30, 'prioritize_ends': True},
'dataset': {'batch': 10, 'length': 10},
}).parse_flags()
env = gym.make('gym_orderbook:Trader-v0')
dv2.train(env, config)
And trying to load the variables file using the code from my first question.
The config.yaml I'm loading is from the logdir/config.yaml this is right?
Maybe I'm missing call same wrapper?
Thanks in advanced.
from dreamerv2.
Hey, could you also please show how do you run an entire evaluation episode, calling the get_action() function at each step? It is not clear to me what the input to that function should be. Also, I believe the state of the world model should be updated and passed all the time... Thank you!
from dreamerv2.
Related Issues (20)
- Batch size = 16? HOT 1
- Should policy state be reset after every episode? HOT 1
- Straight-thru gradients vs Gumbel Softmax HOT 1
- Can't reproduce riverraid's results HOT 2
- replay data memory usage? HOT 1
- Why stop-grad on actor's input state in imagine() function ? HOT 1
- Questions on Imagination MDP and imagination horizon H = 15
- Questions about expl.py and updating the batch dataset HOT 2
- Why share states across random batches for training the world model? HOT 1
- ValueError: . Tensor must have rank 4. Received rank 3, shape (208, 64, 64) HOT 1
- Prediction returning the same action from different observations
- How does dreamerv2 perform on feature-based tasks? HOT 4
- Understanding re-clipping in Truncated Normal distribution HOT 1
- the Desire of Hyperparameters of Humanoid-Walk
- Reward different on evaluation HOT 1
- Performance difference between TruncNormal and TanhNormal
- Outdated dependencies and broken examples HOT 1
- How to reproduce DayDreamer's results in A1 simulator?
- Cannot reproduce Atari Pong scores
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 dreamerv2.