mosdeo
LKYDeepNN
C++

Low dependency(C++11 STL only), good portability, header-only, deep neural networks for embedded

Last updated May 13, 2026
49
Stars
12
Forks
6
Issues
0
Stars/day
Attention Score
26
Language breakdown
No language data available.
Files click to expand
README

LKYDeepNN


LKYDeepNN
  • 可訓練的深度類神經網路 (Deep Neural Network) 函式庫。
  • 輕量,核心部份只依賴 C++11 標準函式庫,低相依性、好移植,方便在嵌入式系統上使用。

Class diagram

this is Class diagram SVG

附有訓練視覺化 demo 程式

  • 訓練視覺化程式以 OpenCV 撰寫,但 LKYDeepNN 本身不依賴 OpenCV。
  • 繪圖功能僅以 function pointer 傳入物件中,在訓練過程中呼叫。
  • 下面這2張圖 ↓ ↓ ↓ ↓ 是 33fps 的 GIF,分別是 classification 和 regression。如果不會動的話,請按 F5 重新整理網頁,或是單獨對圖檔另開新視窗就可以看到動畫了。


classification<em>training</em>demo<em>Spiral.gif  regression</em>training<em>demo</em>Cos(2x)+Sin(3x).gif+Sin(3x).gif "Cos(2x)+Sin(3x) Regression Demo")

隱藏層的層數和節點數可以任意設定,簡單又有彈性

  • std::vector
  • std::vector
  • LKYDeepNN::LKYDeepNN(9, std::vector
  • 目前只能 Fully-Connected,未來會考慮實作 Dropout-Connected 或 Fuzzy-Connected

自由設定活化函數

  • LKYDeepNN::SetActivation( 隱藏層 , 輸出層 )
  • LKYDeepNN::SetActivation( new Tanh() ,new Linear() ) //回歸推薦使用
  • LKYDeepNN::SetActivation( new ReLU() ,new Softmax() ) //分類推薦使用
  • 目前已經有: SeLU, ReLU, Tanh, Softmax, Sigmoid, Linear
  • 可以繼承 abstract class Activation 自由實作任意活化函數

訓練

  • void LKYDeepNN::Training(double learningRate, int epochs, std::vector
  • 每一筆資料都需要先整理成 std::vector
  • std::vector

未來預計處理issue

  • Xavier initialization
  • He initialization
  • 可保存和讀取的 Weights 和 Biases
  • 更豐富得測試資料集
  • Cross Entropy BP(測試中)
  • Hinge Loss Function(努力中)
  • Early Stopping
  • L1 & L2 Regularization
  • Copy Constructor
  • 資料正規化工具
  • 更多活化函數。
  • 訓練過程中可自適應的動態 Learning Rate
  • Weights 分析工具
  • Convolution Layer

編譯參數

  • 在 .vscode/tasks.json 裡

Reference:

致謝

  • Microprogram 贊助上班時間產出。
🔗 More in this category

© 2026 GitRepoTrend · mosdeo/LKYDeepNN · Updated daily from GitHub