提交 c3791c91 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

better explanation following Oliver's suggestions.

上级 27780095
...@@ -274,14 +274,14 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None): ...@@ -274,14 +274,14 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None):
The two lists `xs`, `ys` should have the same number of entries. The The two lists `xs`, `ys` should have the same number of entries. The
function checks if for any corresponding pair `(x,y)` from `zip(xs,ys)` function checks if for any corresponding pair `(x,y)` from `zip(xs,ys)`
`x` and `y` represent the same computations on the same variables `x` and `y` represent the same computations on the same variables
(unless equivalences are provided unsing `in_xs`, `in_ys`) (unless equivalences are provided unsing `in_xs`, `in_ys`).
If `in_xs` and `in_ys` are provided, then these nodes are considered If `in_xs` and `in_ys` are provided, then when comparing a node `x` with
equivalent even if they do not compare equal (they should however have a node `y` they are automatically considered as equal if there is some
the same type). These lists could be used for example to provide index `i` such that `x == in_xs[i]` and `y == in_ys[i]`(and they both
equivalence between inputs of two different graphs if what we want is have the same type). Note that `x` and `y` can be in the list `xs` and
actually to see if (regardless of the input units) the two graph `ys`, but also represent sub subgraph of a computational graph in `xs`
actually perform the same computations on them. or `ys`.
''' '''
if in_xs is None: if in_xs is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论