Perhaps easiest to just point to the place in the code:
struct Metrics <: Callback
metrics::Tuple
function Metrics(metrics...)
return new(Tuple(m isa AbstractMetric ? m : Metric(m) for m in (Loss(), metrics...)))
end
end
Problem seems to be that Metric is not an AbstractMetric, so if one follows the example from the docstring (metrics = Metrics(Metric(Flux.mse, device = gpu), Metric(Flux.mae, device = gpu)) things will fail with some Metric is not callable as the metricfn will be a Metric due to double wrapping.
Sorry for confusing topic.
Perhaps easiest to just point to the place in the code:
Problem seems to be that
Metric
is not anAbstractMetric
, so if one follows the example from the docstring (metrics = Metrics(Metric(Flux.mse, device = gpu), Metric(Flux.mae, device = gpu))
things will fail with some Metric is not callable as the metricfn will be a Metric due to double wrapping.