提交 f2eb4694 authored 作者: Frederic's avatar Frederic

Make the default perform work with params and better error message.

上级 4ed822e5
...@@ -714,7 +714,7 @@ class PureOp(object): ...@@ -714,7 +714,7 @@ class PureOp(object):
"own op, implement the R_op method." % "own op, implement the R_op method." %
(self, self.__class__.__name__)) (self, self.__class__.__name__))
def perform(self, node, inputs, output_storage): def perform(self, node, inputs, output_storage, params=None):
""" """
Required: Calculate the function on the inputs and put the variables in Required: Calculate the function on the inputs and put the variables in
the output storage. Return None. the output storage. Return None.
...@@ -746,7 +746,10 @@ class PureOp(object): ...@@ -746,7 +746,10 @@ class PureOp(object):
The subclass does not override this method. The subclass does not override this method.
""" """
raise utils.MethodNotDefined("perform", type(self), self.__class__.__name__) raise utils.MethodNotDefined(
"perform", type(self), self.__class__.__name__,
"Did you used Theano flags mode=FAST_COMPILE?"
" You can use optimizer=fast_compile instead.")
def do_constant_folding(self, node): def do_constant_folding(self, node):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论