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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: Scitator/catalyst
Commit Name: f4beaac559e00a3676d942dc7e8fea69efc01cfe
Time: 2020-11-30
Author: raveforlive@gmail.com
File Name: catalyst/metrics/avg_precision.py
Class Name:
Method Name: mean_avg_precision