std1.0.0-beta-7 SafeC docs

std :: ml::device

Function std::device_loss_scale

#include <std/ml/device.h> source · definition

float device_loss_scale(int device)

The fp16 loss scale on 'device' (waits): gradients are scaled by it during backward and unscaled when backward ends, a step that overflowed is skipped by the optimizer, and the scale halves on overflow and doubles after 2000 clean steps. 1 when the device isn't in fp16.