Comments (2)
Okay, I will check it.
from deepy.
Hey there, to summarize my direct problem: what kind of "state" should i be using? I am trying array with shape (40, 40)
so I had to modify the example, changing:
action = self.model.compute([state]) # gives us (1, 40, 40) when we want (40, 40) state
to:
action = self.model.compute(state) # gives us (40, 40)
And now I get:
ValueError: Shape mismatch: x has 40 cols (and 40 rows) but y has 1600 rows (and 100 cols)
Apply node that caused the error: Dot22(x, W_dense1)
Inputs types: [TensorType(float64, matrix), TensorType(float64, matrix)]
Inputs shapes: [(40, 40), (1600, 100)]
Inputs strides: [(320, 8), (800, 8)]
Inputs values: ['not shown', 'not shown']
Maybe I'm doing something else wrong and I don't want to poke around too much in the deepy codebase--but how should I be setting up the state properly?
Full output:
$ python src/run.py deepq
Starting experiment...
state_num = 1600
> /Users/eric/src/plithos/src/plithos/deep_q_learner.py(57)get_action()
56 import ipdb; ipdb.set_trace()
---> 57 action = self.model.compute(state)
58 return int(action[0].argmax())
ipdb> c
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
src/run.py in <module>()
48 drone_count=args.drone_count,
49 )
---> 50 experiment.start()
51
52
/Users/eric/src/plithos/src/plithos/simulations/dqn_single_drone.py in start(self)
21
22 state = self.map.copy()
---> 23 action = self.agent.get_action(state)
24 reward = 0
25
/Users/eric/src/plithos/src/plithos/deep_q_learner.pyc in get_action(self, state)
55 with self.thread_lock:
56 import ipdb; ipdb.set_trace()
---> 57 action = self.model.compute(state)
58 return int(action[0].argmax())
59
/Users/eric/.virtualenvs/plithos/lib/python2.7/site-packages/deepy/networks/network.pyc in compute(self, *x)
143 """
144 self._compile()
--> 145 return self._compute(*x)
146
147 @property
/Users/eric/.virtualenvs/plithos/lib/python2.7/site-packages/theano/compile/function_module.pyc in __call__(self, *args, **kwargs)
604 self.fn.nodes[self.fn.position_of_error],
605 self.fn.thunks[self.fn.position_of_error],
--> 606 storage_map=self.fn.storage_map)
607 else:
608 # For the c linker We don't have access from
/Users/eric/.virtualenvs/plithos/lib/python2.7/site-packages/theano/compile/function_module.pyc in __call__(self, *args, **kwargs)
593 t0_fn = time.time()
594 try:
--> 595 outputs = self.fn()
596 except Exception:
597 if hasattr(self.fn, 'position_of_error'):
ValueError: Shape mismatch: x has 40 cols (and 40 rows) but y has 1600 rows (and 100 cols)
Apply node that caused the error: Dot22(x, W_dense1)
Inputs types: [TensorType(float64, matrix), TensorType(float64, matrix)]
Inputs shapes: [(40, 40), (1600, 100)]
Inputs strides: [(320, 8), (800, 8)]
Inputs values: ['not shown', 'not shown']
HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
from deepy.
Related Issues (20)
- slow compilation in draw
- Regarding developing tutorial to use deepy HOT 4
- RNN state HOT 6
- Pip version error HOT 1
- DRAW / attention zoomer HOT 2
- ImportError: cannot import name NeuralLayer HOT 2
- RuntimeError: maximum recursion depth exceeded HOT 5
- Missing n_steps in LSTM layer HOT 2
- TypeError: 'NoneType' object is not callable HOT 2
- DQNAgent convergance ? HOT 1
- RAE incorrect encode function HOT 1
- Using `theano` on Windows platform does not increase speed HOT 4
- RECURRENT NEURAL NETWORK REGULARIZATION
- Neural Networks with Few Multiplications
- cannot import name NeuralLayer HOT 1
- error in tutorial
- Argument error in attention layer initialization. HOT 1
- Any interest in getting Deepy to use TensorFlow as a backend?
- High version of Theano support
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 deepy.