jeudi 28 juillet 2016

can't understand python set operation

I can't understand a simply python code. Below, 'blobs' is a list of ndarray and 'end' is explained to be 'optional name of layer'.

   if end is not None:
        end_ind = list(self._layer_names).index(end)
        outputs = set([end] + blobs)     # <== this line.
    else:
        end_ind = len(self.layers) - 1
        outputs = set(self.outputs + blobs)

What does the statement 'set([end] + blobs) mean?

Aucun commentaire:

Enregistrer un commentaire