Skip to content

TheMrSheldon/libdl

Repository files navigation

libdl

Simple yet powerful deep learning

GPL 2.0 License

Current Release


Documentation  |  API  |  Examples  |  Citation

Usage

int main(int argc, char* argv[]) {
    MyModel model;

    using Trainer = dl::InferTrainer<MyModel>;
    Trainer trainer(Trainer::Settings{
        .createDataset = [] { return std::make_unique<MyDataset>(); },
        .loss = dl::loss::mse,
        .optimizer = std::make_unique<dl::optimizer::Adam>(),
        .limitEpochs = 10,
    });
    trainer.fit(model);
    trainer.test(model);
}

Installation

CMake

FetchContent_Declare(libdl GIT_REPOSITORY https://github.com/TheMrSheldon/libdl.git)
FetchContent_MakeAvailable(libdl)
target_link_libraries(<mytarget> PUBLIC libdl)