提交 e0ad27db authored 作者: David Warde-Farley's avatar David Warde-Farley

Comment explaining infer_shape.

上级 e271e455
...@@ -108,6 +108,9 @@ class IfElse(PureOp): ...@@ -108,6 +108,9 @@ class IfElse(PureOp):
ts_shapes = inputs_shapes[1:][:self.n_outs] ts_shapes = inputs_shapes[1:][:self.n_outs]
fs_shapes = inputs_shapes[1:][self.n_outs:] fs_shapes = inputs_shapes[1:][self.n_outs:]
# All elements of all shape tuples for the true and false outputs are
# unpacked into the inputs of a separate ifelse, and then the outputs
# of that ifelse are packed back into shape tuples.
new_ts_inputs = [] new_ts_inputs = []
for ts_shape in ts_shapes: for ts_shape in ts_shapes:
if isinstance(ts_shape, (list, tuple)): if isinstance(ts_shape, (list, tuple)):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论