Skip to main content

Neural Network and Deep Learning (NNDL) library based on PaddlePaddle

Project description

ming-nndl - Neural Network and Deep Learning

"我们不生产水,我们只是大自然的搬运工" 🚰

基于 PaddlePaddle 的神经网络与深度学习基础库,包含《神经网络与深度学习》书籍实验的完整实现。

📖 关于本项目

nndl 并不是一个公开的标准 Python 库(如 numpy 或 paddle),而是《神经网络与深度学习》这本书配套的自定义教学代码库

正如《第1章 实践基础》中所述:

"为了更深入地理解深度学习的模型和算法,在本书中,我们也手动实现自己的算子库:nndl"

为什么要封装到 PyPI?

在原书的教学环境中,学习者需要手动下载源代码文件才能使用 nndl 库。这在 Google Colab 等云环境中使用时非常不便,每次都要上传或挂载代码文件。

本项目将课程老师提供的原始代码封装为标准 Python 包并发布到 PyPI,使得你可以在任何 Python 环境中一键安装

pip install ming-nndl

这样就能直接在 Colab、Jupyter Notebook 或本地环境中运行书中的实验代码,无需手动管理文件。

声明

  • 本项目代码来自课程老师提供的原始教学材料
  • 仅进行了打包封装,未修改核心算法逻辑
  • 目的是方便学习者使用,非其他用途

安装

pip install ming-nndl

功能特性

  • 数据集工具 (dataset): 内置常用数据集加载器
  • 优化器 (optimizer): 实现各类优化算法
  • 运行器 (runner): 简化模型训练流程
  • 评估指标 (metric): 常用评估指标计算
  • 基础算子 (op): 神经网络基础操作
  • 激活函数 (activation): 常用激活函数实现
  • 工具函数 (tools): 可视化等辅助工具

快速开始

from nndl import RunnerV2
from nndl.dataset import MNIST
from nndl.optimizer import SGD

# 加载数据集
train_dataset = MNIST(mode='train')

# 创建运行器
runner = RunnerV2(model, optimizer=SGD(lr=0.01), metric='accuracy')

# 开始训练
runner.train(train_dataset, epochs=10)

依赖

  • PaddlePaddle >= 2.0.0
  • NumPy
  • Matplotlib
  • Pandas
  • Pillow

项目链接

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ming_nndl-0.0.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ming_nndl-0.0.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file ming_nndl-0.0.1.tar.gz.

File metadata

  • Download URL: ming_nndl-0.0.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for ming_nndl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9cca790f2fb7bb09a29306b12d3cbefd80302e163be1efb78bdf3eeb0db3e90c
MD5 bbbfb883f39a09955b6dffdbe94cfdf8
BLAKE2b-256 e3b53ea830d7837ab421ab2d9f7848da79c4d1deb958cf6f10ca391cefb3a666

See more details on using hashes here.

File details

Details for the file ming_nndl-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ming_nndl-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for ming_nndl-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f3aec71f4afe75a4983350e4c58a02b31dd8a3e5d19c8d6fe9dcd8060ddb6fe
MD5 55fd592e12f5de1cec7ca9e1fcaae520
BLAKE2b-256 15f273a727fb2d0a8cea541f54985d766b7b2ef162c73280098b0b372183dfa2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page