def get_all_tensor_children(tensor):
 children_list = []
 children_list.append(tensor)
 if tensor.op:
  for t in tensor.op.outputs:
   children_list += get_all_tensor_children(t)
 return list(set(children_list))

def get_all_tensor_children ( tensor ) : children_list = [ ] children_list . append ( tensor ) if tensor . op : for t in tensor . op . outputs : children_list += get_all_tensor_children ( t ) return list ( set ( children_list ) )
get all parents tensors .