提交 3a85a032 authored 作者: Frederic's avatar Frederic

Theano GPU variables, shared variable and constant now support <, <=,

> and >= as as those not on the GPU.
上级 1331a0f5
...@@ -86,6 +86,8 @@ New Features ...@@ -86,6 +86,8 @@ New Features
* Garbage collection of intermediate results during Theano function calls * Garbage collection of intermediate results during Theano function calls
for Ops with C code (Pascal L.) for Ops with C code (Pascal L.)
* Theano flags compiledir_format now support the parameter numpy_version. * Theano flags compiledir_format now support the parameter numpy_version.
* Theano GPU variables, shared variable and constant now support <, <=,
> and >= as as those not on the GPU.
Sparse Sparse
* Implement theano.sparse.mul(sparse1, sparse2) when both inputs don't * Implement theano.sparse.mul(sparse1, sparse2) when both inputs don't
......
...@@ -36,14 +36,14 @@ class _operators(tensor.basic._tensor_py_operators): ...@@ -36,14 +36,14 @@ class _operators(tensor.basic._tensor_py_operators):
ndim = property(lambda s:s.type.ndim) ndim = property(lambda s:s.type.ndim)
class CudaNdarrayVariable(Variable, _operators): class CudaNdarrayVariable(_operators, Variable):
pass pass
CudaNdarrayType.Variable = CudaNdarrayVariable CudaNdarrayType.Variable = CudaNdarrayVariable
class CudaNdarrayConstantSignature(tensor.TensorConstantSignature): class CudaNdarrayConstantSignature(tensor.TensorConstantSignature):
pass pass
class CudaNdarrayConstant(Constant, _operators): class CudaNdarrayConstant(_operators, Constant):
def signature(self): def signature(self):
return CudaNdarrayConstantSignature((self.type, numpy.asarray(self.data))) return CudaNdarrayConstantSignature((self.type, numpy.asarray(self.data)))
def __str__(self): def __str__(self):
...@@ -52,7 +52,7 @@ class CudaNdarrayConstant(Constant, _operators): ...@@ -52,7 +52,7 @@ class CudaNdarrayConstant(Constant, _operators):
return "CudaNdarrayConstant{"+str(numpy.asarray(self.data))+"}" return "CudaNdarrayConstant{"+str(numpy.asarray(self.data))+"}"
CudaNdarrayType.Constant = CudaNdarrayConstant CudaNdarrayType.Constant = CudaNdarrayConstant
class CudaNdarraySharedVariable(SharedVariable, _operators): class CudaNdarraySharedVariable(_operators, SharedVariable):
""" """
Shared Variable interface to CUDA-allocated arrays Shared Variable interface to CUDA-allocated arrays
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论