555ca942df407b8c1bf1d48383c60fa1bf09cc1d,keras/utils/layer_utils.py,,count_params,#Any#,12

Before Change


    // Returns
        The total number of scalars composing the weights
    
    return int(np.sum([K.count_params(p) for p in set(weights)]))


def print_summary(model, line_length=None, positions=None, print_fn=None):

After Change


    weight_ids = set()
    total = 0
    for w in weights:
        if id(w) not in weight_ids:
            weight_ids.add(id(w))
            total += int(K.count_params(w))
    return total


def print_summary(model, line_length=None, positions=None, print_fn=None):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 555ca942df407b8c1bf1d48383c60fa1bf09cc1d
Time: 2019-08-28
Author: francois.chollet@gmail.com
File Name: keras/utils/layer_utils.py
Class Name:
Method Name: count_params


Project Name: nilearn/nilearn
Commit Name: 48282d57a0f11094d71c7310898ab347e6b847b3
Time: 2019-03-25
Author: gilles.de.hollander@gmail.com
File Name: nilearn/signal.py
Class Name:
Method Name: _standardize


Project Name: NVIDIA/sentiment-discovery
Commit Name: 81658f79c135ce6e04d89a0055d7090d5efea80e
Time: 2018-08-10
Author: raulp@dbcluster.nvidia.com
File Name: fp16/loss_scaler.py
Class Name: DynamicLossScaler
Method Name: _has_inf_or_nan


Project Name: Qiskit/qiskit-aqua
Commit Name: 282a8ea6d00c787b5bf02628e60e4d3c3f246d25
Time: 2018-06-05
Author: hushaohan@gmail.com
File Name: qiskit_acqua/qpe/qpe.py
Class Name: QPE
Method Name: _compute_energy