本文整理汇总了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
示例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)
示例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]
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)