Comments (5)
sorry for the late reply... I fixed it in agentnet/utils/shared.py
via:
diff --git a/agentnet/utils/shared.py b/agentnet/utils/shared.py
index 3153378..06e5991 100644
--- a/agentnet/utils/shared.py
+++ b/agentnet/utils/shared.py
@@ -10,14 +10,11 @@ import theano.tensor as T
def create_shared(name, initial_value, dtype='floatX', strict=False, allow_downcast=True,device=None):
if dtype == "floatX":
dtype = theano.config.floatX
- initial_value = np.array(initial_value, dtype=dtype)
- if device is not None:
- variable = theano.tensor._shared(initial_value, name=name, strict=strict, allow_downcast=allow_downcast,target=device)
- else:
- variable = theano.shared(initial_value, name=name, strict=strict, allow_downcast=allow_downcast)
+ initial_value = np.ascontiguousarray(initial_value, dtype=dtype)
+ variable = theano.shared(initial_value, name=name, strict=strict, allow_downcast=allow_downcast)
return variable
def set_shared(var, value):
- val_array = np.array(value, dtype=var.dtype)
+ val_array = np.ascontiguousarray(value, dtype=var.dtype)
var.set_value(val_array)
will send a PR soon.
from agentnet.
Hello and sorry for the delay.
Could you please specify in which condition did it occur? (a small code snippet would be ideal).
As a temporary solution, try switching from GpuArray into CUDA backend.
from agentnet.
Wow, thanks! Would happily accept that.
from agentnet.
@kashif Hello again!
Not that we're in a hurry, but if you don't mind i'd commit that on your behalf (with references in comments).
from agentnet.
thanks! So sorry for the delay.. I checked again my stuff and did not get any problems... so I am now confused if this helped or not...
from agentnet.
Related Issues (20)
- Original DQN Example HOT 1
- Deprecation list
- Dockerfile aka "makeitwork"
- Hierarchical MDP as a demo?
- Brief outline of modules HOT 3
- AgentNet recurrence won't compile if batch_size = 1 and unroll_scan=False and at least one input is a single-element vector. HOT 2
- canonicalize LSTM HOT 3
- example:Qlearning with normalized advantage functions HOT 1
- grad dtypes mismatch in some rare case HOT 2
- better weights management for memory layers
- DPG refactor and demo HOT 1
- Vectorized environment
- deprecate preprocess_observation HOT 1
- BaseResolver returns int64 HOT 1
- Support both Theano (Lasagne; Keras) and Tensorflow (Keras) backend HOT 1
- policy_estimators param is weird HOT 3
- Targetnet of layer on top of LSTMCell results in deepcopy error HOT 3
- batch_size parameter is wierd HOT 1
- attention tests 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 agentnet.