提交 45696520 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

replaced float64 with config.floatX

上级 1d7cb530
......@@ -601,7 +601,7 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`
Create a matrix by filling the shape of `a` with `b`
.. function:: eye(n, m = None, k = 0, dtype='float64')
.. function:: eye(n, m = None, k = 0, dtype=theano.config.floatX)
:param n: number of rows in output (value or theano scalar)
:param m: number of columns in output (value or theano scalar)
......
......@@ -1703,7 +1703,7 @@ def zeros_like(model):
return fill(model, constant(0.0, dtype=model.type.dtype))
class Eye(gof.Op):
def __init__(self, dtype='float64'):
def __init__(self, dtype=config.floatX):
self.dtype = dtype
def make_node(self,n,m,k):
n = as_tensor_variable(n)
......@@ -1724,7 +1724,7 @@ class Eye(gof.Op):
return hash(self.dtype) ^ hash(type(self))
def eye(n, m=None, k = 0, dtype = 'float64'):
def eye(n, m=None, k = 0, dtype = config.floatX):
if m == None:
m = n
localop = Eye(dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论