Returns a tensor given by *name* using a deep lookup within the model. *None* is returned
when no tensor was found. In case a tensor is passed, it"s name is used for the lookup.
if isinstance(name, Tensor):
name = name.name
// append the default value_index if there"s none
if not self.value_index_cre.search(name):
name += ":%d" % self.default_value_index
// return the first occurance of a tensor with that name
After Change
returned when no tensor was found. In case a tensor is passed, it"s name is used for the
lookup.
tensors = tuple(self._get(name) for name in names)
return tensors[0] if len(names) == 1 else tensors
def _get(self, name):
if isinstance(name, Tensor):