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

Fix typos in TestShapeoptimizer and CheckStrackTraceFeature classes

上级 652fa754
...@@ -4916,7 +4916,7 @@ class TestLocalUselessIncSubtensorAlloc: ...@@ -4916,7 +4916,7 @@ class TestLocalUselessIncSubtensorAlloc:
assert check_stack_trace(f2, ops_to_check="last") assert check_stack_trace(f2, ops_to_check="last")
class TestShapeoptimizer: class TestShapeOptimizer:
def setup_method(self): def setup_method(self):
utt.seed_rng() utt.seed_rng()
......
...@@ -3250,7 +3250,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check="last", bug_print="raise"): ...@@ -3250,7 +3250,7 @@ def check_stack_trace(f_or_fgraph, ops_to_check="last", bug_print="raise"):
return True return True
class CheckStrackTraceFeature: class CheckStackTraceFeature:
def on_import(self, fgraph, node, reason): def on_import(self, fgraph, node, reason):
# In optdb we only register the CheckStackTraceOptimization when # In optdb we only register the CheckStackTraceOptimization when
# theano.config.check_stack_trace is not off but we also double check here. # theano.config.check_stack_trace is not off but we also double check here.
...@@ -3290,8 +3290,8 @@ class CheckStackTraceOptimization(GlobalOptimizer): ...@@ -3290,8 +3290,8 @@ class CheckStackTraceOptimization(GlobalOptimizer):
"""Optimizer that serves to add CheckStackTraceOptimization as an fgraph feature.""" """Optimizer that serves to add CheckStackTraceOptimization as an fgraph feature."""
def add_requirements(self, fgraph): def add_requirements(self, fgraph):
if not hasattr(fgraph, "CheckStrackTraceFeature"): if not hasattr(fgraph, "CheckStackTraceFeature"):
fgraph.attach_feature(CheckStrackTraceFeature()) fgraph.attach_feature(CheckStackTraceFeature())
def apply(self, fgraph): def apply(self, fgraph):
pass pass
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论