79edae58d5892c5a7eb19b68f9e79dfae4682e20,keras/backend/tensorflow_backend.py,Function,__call__,#Function#Any#,970

Before Change


    def __call__(self, inputs):
        assert type(inputs) in {list, tuple}
        names = [getattr(v, "name", None) for v in self.inputs]
        feed_dict = dict(zip(names, inputs))
        session = get_session()
        updated = session.run(self.outputs + [self.updates_op], feed_dict=feed_dict)
        return updated[:len(self.outputs)]

After Change



    def __call__(self, inputs):
        assert type(inputs) in {list, tuple}
        feed_dict = {}
        for tensor, value in zip(self.inputs, inputs):
            if is_sparse(tensor):
                sparse_coo = value.tocoo()
                indices = np.concatenate((np.expand_dims(sparse_coo.row, 1), np.expand_dims(sparse_coo.col, 1)), 1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 79edae58d5892c5a7eb19b68f9e79dfae4682e20
Time: 2016-09-09
Author: kuza55@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name: Function
Method Name: __call__


Project Name: microsoft/nni
Commit Name: e35fa2b44d4b59cbcb1b9da9a17bc1e7f6d527b1
Time: 2019-06-20
Author: suiguoxin@gmail.com
File Name: src/sdk/pynni/nni/gp_tuner/target_space.py
Class Name: TargetSpace
Method Name: array_to_params


Project Name: asyml/texar
Commit Name: f9bcfc0c35aecbe611f7b1e46f768cd3b157a879
Time: 2018-08-05
Author: zhiting.hu@petuum.com
File Name: texar/models/seq2seq/basic_seq2seq.py
Class Name: BasicSeq2seq
Method Name: _get_predictions


Project Name: NifTK/NiftyNet
Commit Name: 60ac44f9e688577d47ae506be06058a8916af100
Time: 2018-05-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_window.py
Class Name: ImageWindow
Method Name: _update_placeholders_dict