当前位置: 首页>>代码示例>>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;未经允许,请勿转载。