5ef0fc3215fb43f5772673b31c51ad8a6582bc39,keras/backend/cntk_backend.py,,reshape,#,1105

Before Change




def reshape(x, shape):
    shape = tuple([C.InferredDimension if _ == C.FreeDimension else _ for _ in shape])
    if isinstance(x, C.variables.Parameter):
        return C.reshape(x, shape)
    else:
        num_dynamic_axis = _get_dynamic_axis_num(x)

After Change




def reshape(x, shape):
    shape_temp = []
    for _ in shape:
        if _ == C.FreeDimension:
            shape_temp.append(C.InferredDimension)
        else:
            shape_temp.append(_)

    shape = tuple(shape_temp)

    if isinstance(x, C.variables.Parameter):
        return C.reshape(x, shape)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: keras-team/keras
Commit Name: 5ef0fc3215fb43f5772673b31c51ad8a6582bc39
Time: 2018-10-20
Author: mechaprabal@gmail.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: reshape


Project Name: keras-team/keras
Commit Name: 5ef0fc3215fb43f5772673b31c51ad8a6582bc39
Time: 2018-10-20
Author: mechaprabal@gmail.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: squeeze


Project Name: keras-team/keras
Commit Name: bf464d7ed9283988fea1f548a11a0171fd2ff364
Time: 2021-01-06
Author: gardener@tensorflow.org
File Name: keras/utils/version_utils.py
Class Name:
Method Name: swap_class