/
vuron
/
adept
Обзор
Документация
Войти
/
vuron
/
adept
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
python/cpp_bindings/adeptmodule.cpp
55 строк
1 KB
kolkir
Refactor python folder structure
01 мар 2025, 22:16
01 мар 2025, 22:16
ef25f05
Код
Авторство
О чём код?
#include <pybind11/pybind11.h> namespace py = pybind11; void bind_shape(py::module&); void bind_tensor_props(py::module&); void bind_tensor(py::module&); void bind_variable(py::module&); void bind_module(py::module&); void bind_linear(py::module&); void bind_conv2d(py::module& m); void bind_sgd(py::module&); void bind_adam(py::module&); void bind_dataset(py::module&); void bind_mnistdataset(py::module&); void bind_dataloader(py::module&); void bind_losses(py::module&); void bind_fileinput(py::module&); void bind_fileoutput(py::module&); void bind_grad_guard(py::module& m); void bind_avgpool2d(py::module& m); void bind_maxpool2d(py::module& m); void bind_activations(py::module& m); void bind_batchnorm2d(py::module& m); PYBIND11_MODULE(adeptpy, m) { bind_shape(m); bind_tensor_props(m); bind_tensor(m); bind_variable(m); bind_grad_guard(m); auto m_nn = m.def_submodule("nn"); bind_module(m_nn); bind_linear(m_nn); bind_conv2d(m_nn); bind_avgpool2d(m_nn); bind_maxpool2d(m_nn); bind_sgd(m_nn); bind_adam(m_nn); bind_activations(m_nn); bind_batchnorm2d(m_nn); auto m_data = m.def_submodule("data"); bind_dataset(m_data); bind_mnistdataset(m_data); bind_dataloader(m_data); auto m_loss = m.def_submodule("loss"); bind_losses(m_loss); auto m_serialize = m.def_submodule("serialize"); bind_fileinput(m_serialize); bind_fileoutput(m_serialize); }