• khaotik's avatar
    bug fix/cleanups · 7608602e
    khaotik 提交于
    - 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.
    7608602e
unittest_tools.py 15.7 KB