2ba7725df0cbc3183d9cdc49f797614d24c9f80e,detector/detector.py,,metrics,#Any#Any#,130

Before Change


    // TODO: Doesn"t make much sense over training data, averaging with initial
    // (bad) predictions.
    auc, update_auc_op = tf.metrics.auc(labels, logits, curve="PR")
    tf.add_to_collection("metric_ops", update_auc_op)
    tf.add_to_collection("metrics", auc)
    tf.summary.scalar("auc", auc)

After Change


def metrics(logits, labels):
    // TODO: AUC doesn"t make much sense over training data, averaging with
    // initial (bad) predictions.
    normalized_logits = tf.sigmoid(logits)

    // Add one AUC metric per class, so we can see individual performance too.
    for cls in range(logits.shape[1]):
        auc, _ = tf.metrics.auc(
            labels[:, cls], normalized_logits[:, cls],
            curve="PR", name=f"iauc/{cls}",
            metrics_collections="metrics",
            updates_collections="metric_ops",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tryolabs/luminoth
Commit Name: 2ba7725df0cbc3183d9cdc49f797614d24c9f80e
Time: 2017-02-23
Author: agustin@tryolabs.com
File Name: detector/detector.py
Class Name:
Method Name: metrics


Project Name: arnomoonens/yarll
Commit Name: 564edeaf4e22c8e8d9e79ef661b24e4e8aef8c16
Time: 2018-02-19
Author: arno.moonens@outlook.com
File Name: agents/ppo.py
Class Name: PPO
Method Name: learn


Project Name: tryolabs/luminoth
Commit Name: b039cceb43f0575c863f9a36d5143bb43fe44678
Time: 2018-03-20
Author: psoto23.ps@gmail.com
File Name: luminoth/models/base/ssd_feature_extractor.py
Class Name: SSDFeatureExtractor
Method Name: _build