mxnet-nn-0.0.1.3: Train a neural network with MXNet in Haskell.

Safe HaskellNone
LanguageHaskell2010

MXNet.NN.EvalMetric

Synopsis

Documentation

data Metric dytpe method Source #

Metric data

metric_sum :: forall dytpe method dytpe method. Lens (Metric dytpe method) (Metric dytpe method) (IORef dytpe) (IORef dytpe) Source #

metric_name :: forall dytpe method method. Lens (Metric dytpe method) (Metric dytpe method) String String Source #

metric_labelname :: forall dytpe method method. Lens (Metric dytpe method) (Metric dytpe method) [String] [String] Source #

metric_instance :: forall dytpe method method. Lens (Metric dytpe method) (Metric dytpe method) (IORef Int) (IORef Int) Source #

newMetric :: (DType dtype, MonadIO m) => method -> String -> [String] -> m (Metric dtype method) Source #

create a new metric data

resetMetric :: (DType dtype, MonadIO m) => Metric dtype method -> m () Source #

reset all information

getMetric :: (DType dtype, MonadIO m) => Metric dtype method -> m Float Source #

get the metric

formatMetric :: (DType dtype, MonadIO m) => Metric dtype method -> m String Source #

format the metric as string

class EvalMetricMethod method where Source #

Abstract Evaluation type class

Minimal complete definition

evaluate

Methods

evaluate :: DType dtype => Metric dtype method -> NDArray dtype -> NDArray dtype -> IO () Source #

Instances

EvalMetricMethod CrossEntropy Source # 

Methods

evaluate :: DType dtype => Metric dtype CrossEntropy -> NDArray dtype -> NDArray dtype -> IO () Source #

data CrossEntropy Source #

Basic evluation - cross entropy

Constructors

CrossEntropy 

Instances

EvalMetricMethod CrossEntropy Source # 

Methods

evaluate :: DType dtype => Metric dtype CrossEntropy -> NDArray dtype -> NDArray dtype -> IO () Source #