提交 e088e2a8 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #4061 from nouiz/param

Correct In parameter name following Param removal
...@@ -116,7 +116,7 @@ one. You can do it like this: ...@@ -116,7 +116,7 @@ one. You can do it like this:
>>> from theano import function >>> from theano import function
>>> x, y = T.dscalars('x', 'y') >>> x, y = T.dscalars('x', 'y')
>>> z = x + y >>> z = x + y
>>> f = function([x, In(y, default=1)], z) >>> f = function([x, In(y, value=1)], z)
>>> f(33) >>> f(33)
array(34.0) array(34.0)
>>> f(33, 2) >>> f(33, 2)
...@@ -137,7 +137,7 @@ be set positionally or by name, as in standard Python: ...@@ -137,7 +137,7 @@ be set positionally or by name, as in standard Python:
>>> x, y, w = T.dscalars('x', 'y', 'w') >>> x, y, w = T.dscalars('x', 'y', 'w')
>>> z = (x + y) * w >>> z = (x + y) * w
>>> f = function([x, In(y, default=1), In(w, default=2, name='w_by_name')], z) >>> f = function([x, In(y, value=1), In(w, value=2, name='w_by_name')], z)
>>> f(33) >>> f(33)
array(68.0) array(68.0)
>>> f(33, 2) >>> f(33, 2)
...@@ -154,8 +154,8 @@ array(33.0) ...@@ -154,8 +154,8 @@ array(33.0)
that are passed as arguments. The symbolic variable objects have name that are passed as arguments. The symbolic variable objects have name
attributes (set by ``dscalars`` in the example above) and *these* are the attributes (set by ``dscalars`` in the example above) and *these* are the
names of the keyword parameters in the functions that we build. This is names of the keyword parameters in the functions that we build. This is
the mechanism at work in ``In(y, default=1)``. In the case of ``In(w, the mechanism at work in ``In(y, value=1)``. In the case of ``In(w,
default=2, name='w_by_name')``. We override the symbolic variable's name value=2, name='w_by_name')``. We override the symbolic variable's name
attribute with a name to be used for this function. attribute with a name to be used for this function.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论