本文整理匯總了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)