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