← 开源
albertbup

deep-belief-network

A Python implementation of Deep Belief Networks built upon NumPy and TensorFlow with scikit-learn compatibility

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
510
Star
208
Fork
+0
本周
6
贡献者
创建于 2015-07-13 · 更新于 2026-05-23 · 今日第 18089 名
主要开发者
albertbupmathiasvhskx300

albertbup/deep-belief-network 排名第 18,089,有 510 个星标。

同类别比较

albertbup/deep-belief-network 排名第 18,089,此处有 8 个同类条目;MadryLab/cifar10_challenge 排名第 18,083。

同类别比较
名称排名指标
mindsdb/lightwood18,071
语言:
Python
星标数:
511
分叉数:
101
简介:
Lightwood is Legos for Machine Learning.
thunlp/TensorFlow-TransX18,074
语言:
Python
星标数:
511
分叉数:
193
简介:
An implementation of TransE and its extended models for Knowledge Representation Learning on TensorFlow
twtygqyy/pytorch-SRResNet18,077
语言:
Python
星标数:
511
分叉数:
130
简介:
pytorch implementation for Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network arXiv:1609.04802
MadryLab/cifar10_challenge18,083
语言:
Python
星标数:
510
分叉数:
129
简介:
A challenge to explore adversarial robustness of neural networks on CIFAR10.
microsoft/robustlearn18,097
语言:
Python
星标数:
510
分叉数:
66
简介:
Robust machine learning for responsible AI
wvangansbeke/Sparse-Depth-Completion18,102
语言:
Python
星标数:
510
分叉数:
77
简介:
Predict dense depth maps from sparse and noisy LiDAR frames guided by RGB images. (Ranked 1st place on KITTI) [MVA 2019]
CrawlScript/tf_geometric18,104
语言:
Python
星标数:
509
分叉数:
94
简介:
Efficient and Friendly Graph Neural Network Library for TensorFlow 1.x and 2.x
NousResearch/Open-Reasoning-Tasks18,107
语言:
JavaScript
星标数:
509
分叉数:
72
简介:
A comprehensive repository of reasoning tasks for LLMs (and beyond)
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
关键词Data science, Model architecture, Research
星标数510
分叉数208
贡献者6
创建日期2015-07-13
更新日期2026-05-23
1 天星标数0
7 天星标数0
排名18,089
上次排名17,850
排名变化-239
7 天星标排名16,458
上次 7 天星标排名16,471
7 天星标排名变化13
总星标排名19,072
上次总星标排名19,047
总星标排名变化-25
README 摘录

deep-belief-network A simple, clean, fast Python implementation of Deep Belief Networks based on binary Restricted Boltzmann Machines (RBM), built upon NumPy, TensorFlow and scikit-learn: Hinton, Geoffrey E. "A fast learning algorithm for deep belief nets. "Training restricted Boltzmann machines: an introduction. Overview This project works on Python 3. 6 and follows the scikit-learn API guidelines. The code includes two implementations: one is built on top of TensorFlow while the other one just uses NumPy. To decide

which one to use is as easy as importing the classes from the correct module: for TensorFlow or for NumPy. Usage Clone this repository: and go to the root folder: The docker way: Build the docker image (you'll need to have docker installed in your system): Cool, let's go inside the container and run an example: The virtualenv way: Create a virtual environment for **Python 3. Next, install requirements: Finally, run an example: Citing the code BibTex reference format:

常见问题

记录了多少星标和分叉?

albertbup/deep-belief-network 有 510 个星标和 208 个分叉。

仓库排名是多少?

albertbup/deep-belief-network 排名第 18,089。

记录的语言和类别是什么?

albertbup/deep-belief-network 有 510 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

albertbup/deep-belief-network 与 MadryLab/cifar10_challenge 比较,后者排名第 18,083,有 510 个星标。

README

deep-belief-network

A simple, clean, fast Python implementation of Deep Belief Networks based on binary Restricted Boltzmann Machines (RBM), built upon NumPy, TensorFlow and scikit-learn:

Hinton, Geoffrey E., Simon Osindero, and Yee-Whye Teh. "A fast learning algorithm for deep belief nets." Neural computation 18.7 (2006): 1527-1554.

Fischer, Asja, and Christian Igel. "Training restricted Boltzmann machines: an introduction." Pattern Recognition 47.1 (2014): 25-39.

Overview

This project works on Python 3.6 and follows the scikit-learn API guidelines. The code includes two implementations: one is built on top of TensorFlow while the other one just uses NumPy. To decide which one to use is as easy as importing the classes from the correct module: dbn.tensorflow for TensorFlow or dbn for NumPy.

import numpy as np

np.random.seed(1337)  # for reproducibility
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.metrics.classification import accuracy_score

from dbn.tensorflow import SupervisedDBNClassification
# use "from dbn import SupervisedDBNClassification" for computations on CPU with numpy

# Loading dataset
digits = load_digits()
X, Y = digits.data, digits.target

# Data scaling
X = (X / 16).astype(np.float32)

# Splitting data
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2, random_state=0)

# Training
classifier = SupervisedDBNClassification(hidden_layers_structure=[256, 256],
                                         learning_rate_rbm=0.05,
                                         learning_rate=0.1,
                                         n_epochs_rbm=10,
                                         n_iter_backprop=100,
                                         batch_size=32,
                                         activation_function='relu',
                                         dropout_p=0.2)
classifier.fit(X_train, Y_train)

# Save the model
classifier.save('model.pkl')

# Restore it
classifier = SupervisedDBNClassification.load('model.pkl')

# Test
Y_pred = classifier.predict(X_test)
print('Done.\nAccuracy: %f' % accuracy_score(Y_test, Y_pred))

Usage

Clone this repository:

git clone https://github.com/albertbup/deep-belief-network.git

and go to the root folder:

cd deep-belief-network

The docker way:

Build the docker image (you'll need to have docker installed in your system):

docker build --tag albertbup/deep-belief-network:1.0.5 .

Cool, let's go inside the container and run an example:

docker run --rm -it -v ${PWD}:/code albertbup/deep-belief-network:1.0.5 bash
# Now within the container...
python example_classification.py

The virtualenv way:

Create a virtual environment for Python 3.6 and activate it.

Next, install requirements:

pip install -r requirements.txt

Finally, run an example:

# Now within the virtual environment...
python example_classification.py

Citing the code

BibTex reference format:

    @misc{DBNAlbert,
    title={A Python implementation of Deep Belief Networks built upon NumPy and TensorFlow with scikit-learn compatibility},
    url={https://github.com/albertbup/deep-belief-network},
    author={albertbup},
    year={2017}}
排名相邻
同类项目