std1.0.0-beta-7 SafeC docs

std :: ml::module

Trait std::Parameterized

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

trait Parameterized {
    void collect_params(&Vec<&FloatTensor> out) const;
    void collect_state(&Vec<&FloatTensor> out) const;
}

Required methods

§void collect_params(&Vec<&FloatTensor> out) constsource

Appends every trained tensor, always in the same order.

§void collect_state(&Vec<&FloatTensor> out) constsource

Appends what a copy or a file carries: the trained tensors, then the non-trained buffers (batch norm running statistics, spectral norms' u).