Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module baseline.deepq.models has no attribute mlp #2

Open
gitndlaity opened this issue Apr 25, 2020 · 3 comments
Open

Module baseline.deepq.models has no attribute mlp #2

gitndlaity opened this issue Apr 25, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@gitndlaity
Copy link

Hello,
What can we do in that case
Thank You
Screenshot from 2020-04-25 15-59-38

@akashkmr27089
Copy link

import gym
from baselines import deepq
import balance_bot

def callback(lcl, glb):
# stop training if reward exceeds 199
#is_solved = lcl['t'] > 100 and sum(lcl['episode_rewards'][-101:-1]) / 100 >= 199
is_solved = lcl['episode_rewards'][-1] >= 10
print('\r Current Score {} current status {}'.format(lcl['episode_rewards'][-1], is_solved),end=' ')
return is_solved

def main():
# create the environment
env = gym.make("balancebot-v0") # <-- this we need to create

# create the learning agent
#model = deepq.models.mlp([16, 16])

# train the agent on the environment
act = deepq.learn(
    env, network='mlp', lr=1e-3,
    total_timesteps=200000, buffer_size=50000, exploration_fraction=0.5,
    exploration_final_eps=0.02, print_freq=5, callback=callback
)

# save trained model
act.save("balance.pkl")

if name == 'main':
main()

@akashkmr27089
Copy link

comment model = deepq.models.mlp([16, 16]) and assign network parameter to 'mlp' and change to total_timesteps according to new update gym environment

@gitndlaity
Copy link
Author

gitndlaity commented May 14, 2020 via email

@yconst yconst added the bug Something isn't working label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants