提交 6639305c authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add a test for the allow_downcast issue.

上级 8884e693
...@@ -3,6 +3,7 @@ import numpy ...@@ -3,6 +3,7 @@ import numpy
import theano import theano
from theano.compile import DeepCopyOp from theano.compile import DeepCopyOp
from .config import test_ctx_name
from .test_basic_ops import rand_gpuarray from .test_basic_ops import rand_gpuarray
from ..type import GpuArrayType from ..type import GpuArrayType
...@@ -37,3 +38,7 @@ def test_specify_shape(): ...@@ -37,3 +38,7 @@ def test_specify_shape():
g = GpuArrayType(dtype='float32', broadcastable=(False,))('g') g = GpuArrayType(dtype='float32', broadcastable=(False,))('g')
f = theano.function([g], theano.tensor.specify_shape(g, [20])) f = theano.function([g], theano.tensor.specify_shape(g, [20]))
f(a) f(a)
def test_filter_float():
s = theano.shared(numpy.array(0.0, dtype='float32'), target=test_ctx_name)
theano.function([], updates=[(s, 0.0)])
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论