提交 ca5378f7 authored 作者: Tanjay94's avatar Tanjay94

Changed function signature and called super.

上级 e8a626db
...@@ -25,8 +25,9 @@ AddConfigVar('floatX', ...@@ -25,8 +25,9 @@ AddConfigVar('floatX',
) )
AddConfigVar('warn_float64', AddConfigVar('warn_float64',
"Warning, parts of the graph are in float64 which can't be run on the GPU", "Warning, parts of the graph are in float64 which can't be run on the GPU with the current(old) gpu back-end.",
BoolParam(False) BoolParam(False),
in_c_key=False,
) )
AddConfigVar('cast_policy', AddConfigVar('cast_policy',
......
...@@ -575,7 +575,8 @@ class _tensor_py_operators: ...@@ -575,7 +575,8 @@ class _tensor_py_operators:
class TensorVariable(_tensor_py_operators, Variable): class TensorVariable(_tensor_py_operators, Variable):
"""Subclass to add the tensor operators to the basic `Variable` class.""" """Subclass to add the tensor operators to the basic `Variable` class."""
def __init__(self, type, name=None): def __init__(self, type, owner=None, index=None, name=None):
super(TensorVariable, self).__init__(type, owner=owner, index=index, name=name)
if (config.warn_float64 and type == 'float64'): if (config.warn_float64 and type == 'float64'):
print '''Warning, you are instanciating parts of your graph print '''Warning, you are instanciating parts of your graph
with the float64 type (possibly by accident). with the float64 type (possibly by accident).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论