This is the code for "Google Dopamine (LIVE)" by Siraj Raval on Youtube
llsourcell / google_dopamine_live Goto Github PK
View Code? Open in Web Editor NEWThis is the code for "Google Dopamine (LIVE)" by Siraj Raval on Youtube
This is the code for "Google Dopamine (LIVE)" by Siraj Raval on Youtube
When running this notebook in google colab, a ModuleNotFoundError is thrown for dopamine.atari.
Hello,
I am testing this code in a local installation of dopamine, my script is almost verbatim what is listed here but upon running the code, I get the following error.
I did some googling and found that summary_writer may be depreciated:
"tf.train.SummaryWriter is deprecated, instead use tf.summary.FileWriter"
However I'm not quite sure if this is the case in this instance, or if so where/how to indicate that 'FileWriter' should be used instead of 'SummaryWriter'. Wondering if anyone can take a look.
OS: Ubuntu 18.04.1, Tensorflow has been updated to 1.10.* and all other dependencies are installed/tested working (as far as I know. I was able to successfully execute the Atari training example in the dopamine documentation).
Thanks!
Error:
filip@FWS:~/dopamine/tests$ sudo python ./dopamineStream.py
2018-09-22 18:36:59.252144: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Traceback (most recent call last):
File "./dopamineStream.py", line 12, in <module>
class BasicAgent(object):
File "./dopamineStream.py", line 43, in BasicAgent
basic_runner = run_experiment.Runner(LOG_PATH, create_basic_agent, game_name=GAME, num_iterations=200, training_steps=10, evaluation_steps=10, max_steps_per_episode=100)
File "/usr/local/lib/python2.7/dist-packages/gin/config.py", line 1032, in wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/usr/local/lib/python2.7/dist-packages/gin/utils.py", line 50, in augment_exception_message_and_reraise
six.reraise(proxy, None, sys.exc_info()[2])
File "/usr/local/lib/python2.7/dist-packages/gin/config.py", line 1009, in wrapper
return fn(*new_args, **new_kwargs)
File "/home/filip/dopamine/dopamine/atari/run_experiment.py", line 164, in __init__
summary_writer=self._summary_writer)
TypeError: create_basic_agent() got an unexpected keyword argument 'summary_writer'
In call to configurable 'Runner' (<unbound method Runner.__init__>)
Here is the script:
import numpy as np
import os
from dopamine.agents.dqn import dqn_agent
from dopamine.atari import run_experiment
from dopamine.colab import utils as colab_utils
from absl import flags
BASE_PATH = '/tmp/colab_dope_run'
GAME = 'Asterix'
LOG_PATH = os.path.join(BASE_PATH, 'basic_agent', GAME)
class BasicAgent(object):
def __init__(self, sess, num_actions, switch_prob=0.1):
self._sess = sess
self._num_actions = num_actions
self._switch_prob = switch_prob
self._last_action = np.random.randint(num_actions)
self.eval_mode = False
def _choose_actions(self):
if np.random.random() <= self._switch_prob:
self._last_action = np.random.randint(self._num_actions)
return self._last_action
def bundle_and_checkpoint(self, unused_checkpoint_dir, unused_iteration):
pass
def unbundle(self, unused_checkpoint_dir, unushed_checkpoint_version, unused_data):
pass
def begin_episode(self, unused_observation):
pass
def end_episode(self, unused_reward):
pass
def step(self, reward, observation):
return self._choose_action()
def create_basic_agent(sess, environment):
return BasicAgent(sess, num_actions=environment.action_space.n, swit_prob=0.2)
basic_runner = run_experiment.Runner(LOG_PATH, create_basic_agent, game_name=GAME, num_iterations=200, training_steps=10, evaluation_steps=10, max_steps_per_episode=100)
print('Now training; this may take a while..')
basic_runner.run_experiement()
print('done training')
The tensorboard here (http://e5d6120b.ngrok.io/#scalars) shows a bunch of graphs. How do you interpret them and what does the ideal graph look like?
Does this visual corelate with training cost?
What is our intent/goal out of this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.