029461c7d1fe7a6927a6f9d0fa13dbf49543b413,keras/backend/cntk_backend.py,,batch_get_value,#Any#,2296

Before Change



def batch_get_value(xs):
    result = []
    for x in xs:
        if (isinstance(x, C.variables.Parameter) or
           isinstance(x, C.variables.Constant)):
            result.append(x.value)
        else:
            result.append(eval(x))
    return result


def set_value(x, value):

After Change




def batch_get_value(xs):
    result = [get_value(x) for x in xs]

    return result

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 029461c7d1fe7a6927a6f9d0fa13dbf49543b413
Time: 2019-03-14
Author: abhai.dilip@gmail.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: batch_get_value


Project Name: vitchyr/rlkit
Commit Name: f8ef11d3f0966a7f3fb2073009d397c0a62af79c
Time: 2019-04-04
Author: vitchyr@gmail.com
File Name: rlkit/torch/vae/vae_trainer.py
Class Name: ConvVAETrainer
Method Name: test_epoch


Project Name: home-assistant/home-assistant
Commit Name: 298575f7cbb6efef6c80af54a95faaf8cf9fe4c0
Time: 2017-02-09
Author: turbokongen@hotmail.com
File Name: homeassistant/components/cover/zwave.py
Class Name: ZwaveRollershutter
Method Name: update_properties