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


        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: 3

Non-data size: 4

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: richzhang/PerceptualSimilarity
Commit Name: 8828f67d5d41b88881bd0d7d17a9dbc9a37f98b7
Time: 2018-04-10
Author: cobarnes@adobe.com
File Name: models/dist_model.py
Class Name: DistModel
Method Name: forward


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