def get_tensor_children(tensor):
 children_list = []
 children_list.append(tensor)
 if tensor.op:
  for t in tensor.op.outputs:
   if (not ('read:0' in t.name)):
    children_list += get_tensor_children(t)
 return list(set(children_list))

def get_tensor_children ( tensor ) : children_list = [ ] children_list . append ( tensor ) if tensor . op : for t in tensor . op . outputs : if ( not ( 'read:0' in t . name ) ) : children_list += get_tensor_children ( t ) return list ( set ( children_list ) )
get all calculation and data parent tensors .