class_docstr: `TMMetrics` use torchmetric as the implementation of metrics.
  
  Args:
      metric_name (`str`):
          Indicate which metric is used to evalute.
  
  Example:
      >>> from towhee.trainer.metrics import show_avaliable_metrics, get_metric_by_name
      >>> from towhee.trainer.metrics import TMMetrics
      >>> import torch
      >>> pred = torch.FloatTensor([1.0,1.0,1.0,0.0,0.0,0.0])
      >>> gt = torch.IntTensor([1,1,1,1,1,1])
      >>> metric =  TMMetrics('Accuracy')
      >>> metric.update(pred, gt)
      >>> pred = torch.FloatTensor([1.0,1.0,1.0,1.0,1.0,1.0])
      >>> gt = torch.IntTensor([1,1,1,1,1,1])
      >>> metric.update(pred, gt)
      >>> metric.compute().item()
      0.75
      >>> metric.reset()
      >>> pred = torch.FloatTensor([1.0,1.0,1.0,0.0,0.0,0.0])
      >>> gt = torch.IntTensor([1,1,1,1,1,1])
      >>> metric.update(pred, gt)
      >>> metric.compute().item()
      0.5
class_docstr_tok: ["`","TMMetrics","`","use","torchmetric","as","the","implementation","of","metrics",".","Args",":","metric_name","(","`","str","`",")",":","Indicate","which","metric","is","used","to","evalute",".","Example",":",">",">",">","from","towhee.trainer.metrics","import","show_avaliable_metrics",",","get_metric_by_name",">",">",">","from","towhee.trainer.metrics","import","TMMetrics",">",">",">","import","torch",">",">",">","pred","=","torch.FloatTensor","(","[","1.0,1.0,1.0,0.0,0.0,0.0","]",")",">",">",">","gt","=","torch.IntTensor","(","[","1,1,1,1,1,1","]",")",">",">",">","metric","=","TMMetrics","(","'Accuracy","'",")",">",">",">","metric.update","(","pred",",","gt",")",">",">",">","pred","=","torch.FloatTensor","(","[","1.0,1.0,1.0,1.0,1.0,1.0","]",")",">",">",">","gt","=","torch.IntTensor","(","[","1,1,1,1,1,1","]",")",">",">",">","metric.update","(","pred",",","gt",")",">",">",">","metric.compute","(",")",".item","(",")","0.75",">",">",">","metric.reset","(",")",">",">",">","pred","=","torch.FloatTensor","(","[","1.0,1.0,1.0,0.0,0.0,0.0","]",")",">",">",">","gt","=","torch.IntTensor","(","[","1,1,1,1,1,1","]",")",">",">",">","metric.update","(","pred",",","gt",")",">",">",">","metric.compute","(",")",".item","(",")","0.5"]
code: def get_tm_avaliable_metrics(cls):
      cls._metrics_list = {}
      cls._metrics_list["CatMetric"] = tm.CatMetric
      cls._metrics_list["MaxMetric"] = tm.MaxMetric
      cls._metrics_list["MeanMetric"] = tm.MeanMetric
      cls._metrics_list["MinMetric"] = tm.MinMetric
      cls._metrics_list["SumMetric"] = tm.SumMetric
      cls._metrics_list["PIT"] = tm.PIT
      cls._metrics_list["SDR"] = tm.SDR
      cls._metrics_list["SI_SDR"] = tm.SI_SDR
      cls._metrics_list["SI_SNR"] = tm.SI_SNR
      cls._metrics_list["SNR"] = tm.SNR
      cls._metrics_list[
          "PermutationInvariantTraining"
      ] = tm.PermutationInvariantTraining
      cls._metrics_list[
          "ScaleInvariantSignalDistortionRatio"
      ] = tm.ScaleInvariantSignalDistortionRatio
      cls._metrics_list[
          "ScaleInvariantSignalNoiseRatio"
      ] = tm.ScaleInvariantSignalNoiseRatio
      cls._metrics_list[
          "SignalDistortionRatio"
      ] = tm.SignalDistortionRatio
      cls._metrics_list["SignalNoiseRatio"] = tm.SignalNoiseRatio
      cls._metrics_list["AUC"] = tm.AUC
      cls._metrics_list["AUROC"] = tm.AUROC
      cls._metrics_list["F1"] = tm.F1
      cls._metrics_list["ROC"] = tm.ROC
      cls._metrics_list["Accuracy"] = tm.Accuracy
      cls._metrics_list["AveragePrecision"] = tm.AveragePrecision
      cls._metrics_list[
          "BinnedAveragePrecision"
      ] = tm.BinnedAveragePrecision
      cls._metrics_list[
          "BinnedPrecisionRecallCurve"
      ] = tm.BinnedPrecisionRecallCurve
      cls._metrics_list[
          "BinnedRecallAtFixedPrecision"
      ] = tm.BinnedRecallAtFixedPrecision
      cls._metrics_list["CalibrationError"] = tm.CalibrationError
      cls._metrics_list["CohenKappa"] = tm.CohenKappa
      cls._metrics_list["ConfusionMatrix"] = tm.ConfusionMatrix
      cls._metrics_list["F1Score"] = tm.F1Score
      cls._metrics_list["FBeta"] = tm.FBeta
      cls._metrics_list["FBetaScore"] = tm.FBetaScore
      cls._metrics_list["HammingDistance"] = tm.HammingDistance
      cls._metrics_list["Hinge"] = tm.Hinge
      cls._metrics_list["HingeLoss"] = tm.HingeLoss
      cls._metrics_list["IoU"] = tm.IoU
      cls._metrics_list["JaccardIndex"] = tm.JaccardIndex
      cls._metrics_list["KLDivergence"] = tm.KLDivergence
      cls._metrics_list["MatthewsCorrcoef"] = tm.MatthewsCorrcoef
      cls._metrics_list["MatthewsCorrCoef"] = tm.MatthewsCorrCoef
      cls._metrics_list["Precision"] = tm.Precision
      cls._metrics_list[
          "PrecisionRecallCurve"
      ] = tm.PrecisionRecallCurve
      cls._metrics_list["Recall"] = tm.Recall
      cls._metrics_list["Specificity"] = tm.Specificity
      cls._metrics_list["PSNR"] = tm.PSNR
      cls._metrics_list["SSIM"] = tm.SSIM
      cls._metrics_list[
          "MultiScaleStructuralSimilarityIndexMeasure"
      ] = tm.MultiScaleStructuralSimilarityIndexMeasure
      cls._metrics_list[
          "PeakSignalNoiseRatio"
      ] = tm.PeakSignalNoiseRatio
      cls._metrics_list[
          "StructuralSimilarityIndexMeasure"
      ] = tm.StructuralSimilarityIndexMeasure
      cls._metrics_list["CosineSimilarity"] = tm.CosineSimilarity
      cls._metrics_list["ExplainedVariance"] = tm.ExplainedVariance
      cls._metrics_list["MeanAbsoluteError"] = tm.MeanAbsoluteError
      cls._metrics_list[
          "MeanAbsolutePercentageError"
      ] = tm.MeanAbsolutePercentageError
      cls._metrics_list["MeanSquaredError"] = tm.MeanSquaredError
      cls._metrics_list["MeanSquaredLogError"] = tm.MeanSquaredLogError
      cls._metrics_list["PearsonCorrcoef"] = tm.PearsonCorrcoef
      cls._metrics_list["PearsonCorrCoef"] = tm.PearsonCorrCoef
      cls._metrics_list["R2Score"] = tm.R2Score
      cls._metrics_list["SpearmanCorrcoef"] = tm.SpearmanCorrcoef
      cls._metrics_list["SpearmanCorrCoef"] = tm.SpearmanCorrCoef
      cls._metrics_list[
          "SymmetricMeanAbsolutePercentageError"
      ] = tm.SymmetricMeanAbsolutePercentageError
      cls._metrics_list[
          "TweedieDevianceScore"
      ] = tm.TweedieDevianceScore
      cls._metrics_list["RetrievalFallOut"] = tm.RetrievalFallOut
      cls._metrics_list["RetrievalHitRate"] = tm.RetrievalHitRate
      cls._metrics_list["RetrievalMAP"] = tm.RetrievalMAP
      cls._metrics_list["RetrievalMRR"] = tm.RetrievalMRR
      cls._metrics_list[
          "RetrievalNormalizedDCG"
      ] = tm.RetrievalNormalizedDCG
      cls._metrics_list["RetrievalPrecision"] = tm.RetrievalPrecision
      cls._metrics_list["RetrievalRecall"] = tm.RetrievalRecall
      cls._metrics_list["RetrievalRPrecision"] = tm.RetrievalRPrecision
      cls._metrics_list["WER"] = tm.WER
      cls._metrics_list["BLEUScore"] = tm.BLEUScore
      cls._metrics_list["CharErrorRate"] = tm.CharErrorRate
      cls._metrics_list["CHRFScore"] = tm.CHRFScore
      cls._metrics_list[
          "ExtendedEditDistance"
      ] = tm.ExtendedEditDistance
      cls._metrics_list["MatchErrorRate"] = tm.MatchErrorRate
      cls._metrics_list["SacreBLEUScore"] = tm.SacreBLEUScore
      cls._metrics_list["SQuAD"] = tm.SQuAD
      cls._metrics_list["TranslationEditRate"] = tm.TranslationEditRate
      cls._metrics_list["WordErrorRate"] = tm.WordErrorRate
      cls._metrics_list["WordInfoLost"] = tm.WordInfoLost
      cls._metrics_list["WordInfoPreserved"] = tm.WordInfoPreserved
      cls._metrics_list["MinMaxMetric"] = tm.MinMaxMetric
      cls._metrics_list["MeanAveragePrecision"] = MeanAveragePrecision
  
      return list(cls._metrics_list.keys())
  
imports: from typing import Any, Dict
  import torchmetrics
  from torchmetrics.detection.map import MeanAveragePrecision
label_desc: Use image node_id 1 for calling the TMMetrics obj's underlying member method code with example usage: obj.get_tm_avaliable_metrics(cls) and returns: list