提交 f2c85754 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix the multi gpu script to use the new target argument.

上级 7beebd0c
...@@ -12,7 +12,6 @@ import numpy ...@@ -12,7 +12,6 @@ import numpy
import theano import theano
from theano.sandbox.gpuarray import init_dev from theano.sandbox.gpuarray import init_dev
from theano.sandbox.gpuarray.type import gpuarray_shared_constructor as shared
from theano.sandbox.gpuarray.blas import gpu_dot22 from theano.sandbox.gpuarray.blas import gpu_dot22
...@@ -22,13 +21,13 @@ def main(dev1, dev2): ...@@ -22,13 +21,13 @@ def main(dev1, dev2):
size = 1024 * 16 size = 1024 * 16
data = numpy.random.randn(size, size).astype('float32') data = numpy.random.randn(size, size).astype('float32')
val1a = shared(data, target='ctx1') val1a = theano.shared(data, target='ctx1')
val1b = shared(data, target='ctx1') val1b = theano.shared(data, target='ctx1')
val1c = shared(data, target='ctx1') val1c = theano.shared(data, target='ctx1')
val1d = shared(data, target='ctx1') val1d = theano.shared(data, target='ctx1')
val2a = shared(data, target='ctx2') val2a = theano.shared(data, target='ctx2')
val2b = shared(data, target='ctx2') val2b = theano.shared(data, target='ctx2')
f1 = theano.function([], [gpu_dot22(val1a, val1b), f1 = theano.function([], [gpu_dot22(val1a, val1b),
gpu_dot22(val1c, val1d)]) gpu_dot22(val1c, val1d)])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论