Metrics — PyTorch 1.11.0 documentation
pytorch.org › docs › stableA metric can be thought of as timeseries data and is uniquely identified by the string-valued tuple (metric_group, metric_name). torchelastic makes no assumptions about what a metric_group is and what relationship it has with metric_name. It is totally up to the user to use these two fields to uniquely identify a metric. Note
Accuracy — PyTorch-Ignite v0.4.9 Documentation
pytorch.org › ignitemetric = accuracy() metric.attach(default_evaluator, "accuracy") y_true = torch.tensor( [2, 0, 2, 1, 0, 1]) y_pred = torch.tensor( [ [0.0266, 0.1719, 0.3055], [0.6886, 0.3978, 0.8176], [0.9230, 0.0197, 0.8395], [0.1785, 0.2670, 0.6084], [0.8448, 0.7177, 0.7288], [0.7748, 0.9542, 0.8573], ]) state = default_evaluator.run( [ [y_pred, y_true]]) …