Class BaseMetric
A metric is a function that is used to judge the performance of your model. Metric functions are to be supplied in the metrics parameter when a model is compiled.
Namespace: SiaNet.Metrics
Assembly: SiaNet.dll
Syntax
public abstract class BaseMetric
Constructors
| Improve this Doc View SourceBaseMetric(String)
Initializes a new instance of the BaseMetric class.
Declaration
public BaseMetric(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Properties
| Improve this Doc View SourceName
Gets or sets the name of the metrics.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Methods
| Improve this Doc View SourceCalc(Tensor, Tensor)
Calculates the metric with predicted and true values.
Declaration
public abstract Tensor Calc(Tensor preds, Tensor labels)
Parameters
Type | Name | Description |
---|---|---|
Tensor | preds | The predicted value. |
Tensor | labels | The true value. |
Returns
Type | Description |
---|---|
Tensor |