提交 6d7d97f0 authored 作者: Benjamin Scellier's avatar Benjamin Scellier

first file

上级 bab1c1b8
...@@ -59,11 +59,11 @@ class OpFromGraph(gof.Op): ...@@ -59,11 +59,11 @@ class OpFromGraph(gof.Op):
.. code-block:: python .. code-block:: python
import numpy import numpy as np
import theano import theano
from theano import config, function, OpFromGraph, tensor from theano import config, function, OpFromGraph, tensor
x, y, z = tensor.scalars('xyz') x, y, z = tensor.scalars('xyz')
s = theano.shared(numpy.random.rand(2, 2).astype(config.floatX)) s = theano.shared(np.random.rand(2, 2).astype(config.floatX))
e = x + y * z + s e = x + y * z + s
op = OpFromGraph([x, y, z], [e]) op = OpFromGraph([x, y, z], [e])
# op behaves like a normal theano op # op behaves like a normal theano op
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论