提交 11786780 authored 作者: Bogdan Budescu's avatar Bogdan Budescu

avoid creating float64 variables (might cause warning/exception - config.config.warn_float64)

上级 70340839
......@@ -774,14 +774,16 @@ class MRG_RandomStreams(object):
"""
low = as_tensor_variable(low)
low = undefined_grad(low)
high = as_tensor_variable(high)
high = undefined_grad(high)
if dtype is None:
dtype = scal.upcast(config.floatX, low.dtype, high.dtype)
low = cast(low, dtype=dtype)
high = cast(high, dtype=dtype)
low = undefined_grad(low)
high = undefined_grad(high)
if isinstance(size, tuple):
msg = "size must be a tuple of int or a Theano variable"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论