當前位置: 首頁>>代碼示例>>Python>>正文


Python metrics.MetricsLambda方法代碼示例

本文整理匯總了Python中ignite.metrics.MetricsLambda方法的典型用法代碼示例。如果您正苦於以下問題:Python metrics.MetricsLambda方法的具體用法?Python metrics.MetricsLambda怎麽用?Python metrics.MetricsLambda使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ignite.metrics的用法示例。


在下文中一共展示了metrics.MetricsLambda方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: update

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def update(self, output):

        if not isinstance(self.source_metric, MetricsLambda):
            self.source_metric.update(output)
            return

        # If a source metric is made of several metrics, e.g. MetricsLambda
        # metrics, we need to update each sub-metrics separately
        for source in self.source_metric.args:
            if isinstance(source, Metric):
                source.update(output)
        return 
開發者ID:feedly,項目名稱:transfer-nlp,代碼行數:14,代碼來源:trainers.py

示例2: create_fbeta

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def create_fbeta():
    return MetricsLambda(fbeta, Recall(average=True), Precision(average=True), 0.5, True) 
開發者ID:feedly,項目名稱:transfer-nlp,代碼行數:4,代碼來源:test_trainer.py

示例3: _get_cm

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def _get_cm(metriclambda):
    metrics = list(metriclambda.args)
    while metrics:
        metric = metrics[0]
        if isinstance(metric, ConfusionMatrix):
            return metric
        elif isinstance(metric, MetricsLambda):
            metrics.extend(metric.args)
        del metrics[0] 
開發者ID:microsoft,項目名稱:seismic-deeplearning,代碼行數:11,代碼來源:test_metrics.py

示例4: __add__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __add__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x + y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例5: __radd__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __radd__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x + y, other, self) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例6: __sub__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __sub__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x - y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例7: __rsub__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __rsub__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x - y, other, self) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例8: __mul__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __mul__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x * y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例9: __pow__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __pow__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x ** y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例10: __rpow__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __rpow__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x ** y, other, self) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例11: __mod__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __mod__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x % y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例12: __div__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __div__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x.__div__(y), self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例13: __rdiv__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __rdiv__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x.__div__(y), other, self) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例14: __rtruediv__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __rtruediv__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x.__truediv__(y), other, self) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py

示例15: __floordiv__

# 需要導入模塊: from ignite import metrics [as 別名]
# 或者: from ignite.metrics import MetricsLambda [as 別名]
def __floordiv__(self, other):
        from ignite.metrics import MetricsLambda
        return MetricsLambda(lambda x, y: x // y, self, other) 
開發者ID:leokarlin,項目名稱:LaSO,代碼行數:5,代碼來源:metric.py


注:本文中的ignite.metrics.MetricsLambda方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。