百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

mojo-cnn

> 编程语言
开源

mojo cnn: c++ 卷积 神经网络

199 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

mojo cnn: c++ 卷积 神经网络

MSVC Win64 GCC Linux64

mojo cnn

the fast and easy header only c++ convolutional neural network package

mojo is an efficient C++ CNN / DNN implementation that was built with the goal to balance usability, functionality, and speed. It is ideal for use in real-world applications.

See the mojo cnn wiki for updates on what's new.

Consisting of only a handful of header files, mojo is in portable C++ with old fashioned C tricks for optimization. If built with OpenMP and SSE3, it's speed is competitive with other CPU based CNN frameworks. Being a minimal CPU solution, it is not designed to scale over a cluster to train very deep models (for that, go with GPUs and Caffe, TensorFlow, CNTK, Torch, etc…)

The mojo cnn API provides a 'smart training' option which abstracts the management of the training process but still provides the flexibility to handle the threading and input data as you'd like (enabling real-time data augmentation). Just make a loop and pass in training samples until mojo cnn says stop. You are therefore not limited by the RAM required to hold your data. On the standard MNIST handwritten digit database, mojo's 'smart training' gives 99% accuracy in less than a minute and using only random shifts data augmentation, an accuracy of 99.71% (0.29% error) in about an hour. After a couple of hours 99.75% (0.25%) accuracy is achieved with DeepCNet type of network.

mojo specs
Layers Input, Fully Connected, Convolution, Grouped Convolution, Depth Wise Convolution, Max Pool, Semi-Stochastic Pool, Dropout, Max Feature Map, Resize, Shuffle, DeepCNet, Concatenation. Read more on the wiki
Activations Identity, Hyperbolic Tangent (tanh), Exponential Linear Unit (ELU), Rectified Linear Unit (ReLU), Leaky Rectified Linear Unit (LReLU), Very Leaky Rectified Linear Unitv (VLReLU), Sigmoid, Softmax
Solvers Stochastic Gradient Descent, RMSProp, AdaGrad, Adam
Loss Functions Mean Squared Error, Cross Entropy
Padding Zero, Edge, Median Border Value
Training speed (1st epoch time, MINST 2 layer) about 10 sec with smart training on CPU
Required external dependencies none
Native Windows Support yes
Mutli-core support yes (OpenMP)
g++ 5.3.0/MSVC 2010/2013/2015 yes/yes/yes/yes
Branching yes
Multiple Inputes yes
Real-time Data Augmentation yes, random shift, rotate/scale available if linking OpenCV
Automatic training yes
HTML Training Log and Graphing yes
GPU Support no
Model Zoo DeepCNet MNIST, DeepCNet CIFAR-10, VGG

API Example: Load model and perform prediction:

#include 

mojo::network cnn; 
cnn.read("../models/mojo_mnist.model");
const int predicted_class=cnn.predict_class(float_image.data());

API Example: Construction of a new CNN for MNIST, and train records with OpenMP threading:

…

Here are the weights for the first convolution layer in the MNIST sample model, viewable by linking with opencv, and shown in the color maps gray, hot, tensorglow, and voodoo:

This is a training log from the sample application:

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言