std1.0.0-beta-7 SafeC docs

std :: ml::trainer

Struct std::TrainLossSum

#include <std/ml/trainer.h> source

struct TrainLossSum {
    double host;
    unsigned long dev;
    int device;
    unsigned long steps;
}

Internal: an epoch's running loss sum, kept where the losses are -- a scalar on the device for a device's losses, read once when the epoch ends -- so a step on a GPU doesn't wait for its loss to reach the host.

Fields

§double hostsource

losses computed on the CPU

§unsigned long devsource

the device scalar (fp32), 0 until a device loss

§int devicesource
§unsigned long stepssource