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

Make CDataType work under compute_test_value.

上级 0850be0d
......@@ -14,6 +14,7 @@ import theano
from theano.gof import utils
from theano.gof.utils import MethodNotDefined, object2
from theano.gof import graph
from theano.configparser import change_flags
########
# Type #
......@@ -672,8 +673,10 @@ class CDataType(Type):
from theano.scalar import get_scalar_type
if self._fn is None:
v = get_scalar_type('int64')()
self._fn = theano.function([v], _make_cdata(self)(v), profile=False)
with change_flags(compute_test_value='off'):
v = get_scalar_type('int64')()
self._fn = theano.function([v], _make_cdata(self)(v),
profile=False)
return self._fn
def make_value(self, ptr):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论