Skip to content

Commit

Permalink
Fix assertion error
Browse files Browse the repository at this point in the history
  • Loading branch information
niboshi committed Jul 3, 2017
1 parent 1bc1470 commit 55fc079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chainer/computational_graph.py
Expand Up @@ -87,12 +87,12 @@ class ComputationalGraph(object):
def __init__(self, nodes, edges, variable_style=_var_style,
function_style=_func_style, rankdir='TB',
remove_variable=False, show_name=True):
assert all(isinstance(_, (variable.Variable, function.Function))
assert all(isinstance(_, (variable.VariableNode, function.Function))
for _ in nodes)
assert all(len(_) == 2 for _ in edges)
assert all(
isinstance(_[0], (variable.Variable, function.Function)) and
isinstance(_[1], (variable.Variable, function.Function))
isinstance(_[0], (variable.VariableNode, function.Function)) and
isinstance(_[1], (variable.VariableNode, function.Function))
for _ in edges)
self.nodes = nodes
self.edges = edges
Expand Down

0 comments on commit 55fc079

Please sign in to comment.