提交 bf1655e4 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Rename ReplacementDidntRemovedError to ReplacementDidNotRemoveError

上级 d079273a
...@@ -48,7 +48,7 @@ from theano.gof.toolbox import ( ...@@ -48,7 +48,7 @@ from theano.gof.toolbox import (
NodeFinder, NodeFinder,
NoOutputFromInplace, NoOutputFromInplace,
PrintListener, PrintListener,
ReplacementDidntRemovedError, ReplacementDidNotRemoveError,
ReplaceValidate, ReplaceValidate,
Validator, Validator,
) )
......
...@@ -22,7 +22,7 @@ class AlreadyThere(Exception): ...@@ -22,7 +22,7 @@ class AlreadyThere(Exception):
""" """
class ReplacementDidntRemovedError(Exception): class ReplacementDidNotRemoveError(Exception):
""" """
This exception should be thrown by replace_all_validate_remove This exception should be thrown by replace_all_validate_remove
when an optimization wanted to remove a Variable or a Node from when an optimization wanted to remove a Variable or a Node from
...@@ -621,7 +621,7 @@ class ReplaceValidate(History, Validator): ...@@ -621,7 +621,7 @@ class ReplaceValidate(History, Validator):
file=out, file=out,
) )
print(reason, replacements, file=out) print(reason, replacements, file=out)
raise ReplacementDidntRemovedError() raise ReplacementDidNotRemoveError()
def __getstate__(self): def __getstate__(self):
d = self.__dict__.copy() d = self.__dict__.copy()
......
...@@ -150,7 +150,7 @@ from theano.gof import ( ...@@ -150,7 +150,7 @@ from theano.gof import (
InconsistencyError, InconsistencyError,
Op, Op,
Optimizer, Optimizer,
ReplacementDidntRemovedError, ReplacementDidNotRemoveError,
SequenceDB, SequenceDB,
local_optimizer, local_optimizer,
view_roots, view_roots,
...@@ -1535,7 +1535,7 @@ class GemmOptimizer(Optimizer): ...@@ -1535,7 +1535,7 @@ class GemmOptimizer(Optimizer):
# TODO: retry other applications of gemm (see comment # TODO: retry other applications of gemm (see comment
# in _gemm_from_node) # in _gemm_from_node)
nb_inconsistency_replace += 1 nb_inconsistency_replace += 1
except ReplacementDidntRemovedError: except ReplacementDidNotRemoveError:
nb_replacement_didn_t_remove += 1 nb_replacement_didn_t_remove += 1
self.warned = True self.warned = True
fgraph.remove_feature(u) fgraph.remove_feature(u)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论