Comments (4)
you can try modifying function get_config(FLAGS) into following:
def get_config(FLAGS):
if FLAGS.model == 'm1':
config = M1
# elif FLAGS.model == 'm2':
# config = M2
# for k, v in FLAGS.__dict__['__flags'].items():
for k, v in FLAGS.__flags.items():
if k == 'use_gpu':
if v.value == False:
config.cnn_format = 'NHWC'
else:
config.cnn_format = 'NCHW'
if hasattr(config, k):
setattr(config, k, v.value)
return config
from dqn-tensorflow.
for k in FLAGS.__dict__['__wrapped']:
if k == 'use_gpu':
if not FLAGS.__getattr__(k):
config.cnn_format = 'NHWC'
else:
config.cnn_format = 'NCHW'
if hasattr(config, k):
setattr(config, k, FLAGS.__getattr__(k))
With this change, I didn't get the memory error. However, there are still many bugs in the code for the new tensorflow.
from dqn-tensorflow.
Thanks for the response. After making your proposed update, I receive the following memory error.
Traceback (most recent call last):
File "main.py", line 70, in <module>
tf.app.run()
File "/home/jdmartin86/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "main.py", line 62, in main
agent = Agent(config, env, sess)
File "/home/jdmartin86/sandbox/test-qlearn/DQN-tensorflow/dqn/agent.py", line 23, in __init__
self.memory = ReplayMemory(self.config, self.model_dir)
File "/home/jdmartin86/sandbox/test-qlearn/DQN-tensorflow/dqn/replay_memory.py", line 18, in __init__
self.screens = np.empty((self.memory_size, config.screen_height, config.screen_width), dtype = np.float16)
MemoryError
Is this unrelated?
from dqn-tensorflow.
I met the same MemoryError problem as you, then I modify the memory_size in config.py to a smaller value and then it works. Hope this helps you.
from dqn-tensorflow.
Related Issues (20)
- Trouble loading checkpoints HOT 1
- How to run for more epochs HOT 1
- History is not updated with new game screen created after a terminal state is reached HOT 2
- CUDA_ERROR_OUT_OF_MEMOR HOT 1
- unsupported operand type(s) for +: 'dict_values' and 'list HOT 3
- error memory HOT 1
- No updates to the learning rate
- clipped error function is not correct
- why the content is not match the readerme?
- How to run on Windows? HOT 2
- what's the difference between simple game and detail game
- about starting a new game and History HOT 1
- terminal in agent.py seem not handle properly HOT 1
- Any one who can share model details? HOT 3
- AssertionError: Cannot call env.step() before calling reset() HOT 1
- load failed HOT 3
- How to play the code?
- why the Breakout-v0's action_size is 4 ,but in the checkpoint is 6 HOT 1
- Ram consumption 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 dqn-tensorflow.