bug fix/cleanups
- Moved old docstring in OpFromGraph to function op_from_graph
- Added an new example for op_from_graph docstring
- now we can access `theano.op_from_graph` and
`theano.OpFromGraph<Inline|Precompiled>`
in `unittesttools.py`:
```
if check_topo:
topo_shape = shapes_function.maker.fgraph.toposort()
assert not any(isinstance(t.op, cls) for t in topo_shape)
topo_out = outputs_function.maker.fgraph.toposort()
assert any(isinstance(t.op, cls) for t in topo_out)
```
This seems to check existence of op in `topo_out` regardless `check_topo`.
Since OpFromGraphInline will be replaced with its internal graph at
compile time, this check will always cause error. Thus I moved them
inside the `if` clause.
正在显示
请
注册
或者
登录
后发表评论