20ea228773616f824fa5099d0a6e51b7f829d094,tfdeploy.py,Model,get,#Model#,72

Before Change


            name += ":%d" % self.default_value_index

        // return the first occurance of a tensor with that name
        return reduce(lambda t1,t2: t1 or t2.get(name), self.root, None)

    def __getitem__(self, name):
        return self.get(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):
            name = name.name
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: riga/tfdeploy
Commit Name: 20ea228773616f824fa5099d0a6e51b7f829d094
Time: 2016-03-10
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Model
Method Name: get


Project Name: GPflow/GPflow
Commit Name: acc533ac66fa4d19420a36006ece53a440d03761
Time: 2018-11-05
Author: art.art.v@gmail.com
File Name: gpflow/kernels/base.py
Class Name: Combination
Method Name: K


Project Name: GPflow/GPflow
Commit Name: acc533ac66fa4d19420a36006ece53a440d03761
Time: 2018-11-05
Author: art.art.v@gmail.com
File Name: gpflow/kernels/base.py
Class Name: Combination
Method Name: K_diag


Project Name: riga/tfdeploy
Commit Name: 20ea228773616f824fa5099d0a6e51b7f829d094
Time: 2016-03-10
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: get