提交 054d909c authored 作者: Frederic's avatar Frederic

code clean up

上级 ae403379
...@@ -8,7 +8,7 @@ from theano.gof.op import Op ...@@ -8,7 +8,7 @@ from theano.gof.op import Op
from theano.gof.opt import * from theano.gof.opt import *
from theano.gof import destroyhandler from theano.gof import destroyhandler
from theano.gof.fg import FunctionGraph as Env, InconsistencyError from theano.gof.fg import FunctionGraph, InconsistencyError
from theano.gof.toolbox import ReplaceValidate from theano.gof.toolbox import ReplaceValidate
from copy import copy from copy import copy
...@@ -91,9 +91,9 @@ def inputs(): ...@@ -91,9 +91,9 @@ def inputs():
z = MyVariable('z') z = MyVariable('z')
return x, y, z return x, y, z
_Env = Env
def Env(inputs, outputs, validate=True): def Env(inputs, outputs, validate=True):
e = _Env(inputs, outputs) e = FunctionGraph(inputs, outputs)
e.attach_feature(destroyhandler.DestroyHandler()) e.attach_feature(destroyhandler.DestroyHandler())
e.attach_feature(ReplaceValidate()) e.attach_feature(ReplaceValidate())
if validate: if validate:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论