All Projects → CyberZHG → keras-ordered-neurons

CyberZHG / keras-ordered-neurons

Licence: other
Ordered Neurons LSTM

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to keras-ordered-neurons

Neural-Chatbot
A Neural Network based Chatbot
Stars: ✭ 68 (+134.48%)
Mutual labels:  recurrent-neural-networks
rnn benchmarks
RNN benchmarks of pytorch, tensorflow and theano
Stars: ✭ 85 (+193.1%)
Mutual labels:  recurrent-neural-networks
Introduction-to-Deep-Learning-and-Neural-Networks-Course
Code snippets and solutions for the Introduction to Deep Learning and Neural Networks Course hosted in educative.io
Stars: ✭ 33 (+13.79%)
Mutual labels:  recurrent-neural-networks
svae cf
[ WSDM '19 ] Sequential Variational Autoencoders for Collaborative Filtering
Stars: ✭ 38 (+31.03%)
Mutual labels:  recurrent-neural-networks
deep-blueberry
If you've always wanted to learn about deep-learning but don't know where to start, then you might have stumbled upon the right place!
Stars: ✭ 17 (-41.38%)
Mutual labels:  recurrent-neural-networks
POPQORN
An Algorithm to Quantify Robustness of Recurrent Neural Networks
Stars: ✭ 44 (+51.72%)
Mutual labels:  recurrent-neural-networks
ACT
Alternative approach for Adaptive Computation Time in TensorFlow
Stars: ✭ 16 (-44.83%)
Mutual labels:  recurrent-neural-networks
mmn
Moore Machine Networks (MMN): Learning Finite-State Representations of Recurrent Policy Networks
Stars: ✭ 39 (+34.48%)
Mutual labels:  recurrent-neural-networks
GTAV-Self-driving-car
Self driving car in GTAV with Deep Learning
Stars: ✭ 15 (-48.28%)
Mutual labels:  recurrent-neural-networks
Human-Activity-Recognition
Human activity recognition using TensorFlow on smartphone sensors dataset and an LSTM RNN. Classifying the type of movement amongst six categories (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING).
Stars: ✭ 16 (-44.83%)
Mutual labels:  recurrent-neural-networks
Keras-LSTM-Trajectory-Prediction
A Keras multi-input multi-output LSTM-based RNN for object trajectory forecasting
Stars: ✭ 88 (+203.45%)
Mutual labels:  recurrent-neural-networks
LSTM-footballMatchWinner
This repository contains the code for a conference paper "Predicting the football match winner using LSTM model of Recurrent Neural Networks" that we wrote
Stars: ✭ 44 (+51.72%)
Mutual labels:  recurrent-neural-networks
roboinstruct-1
A robot learning from demonstration framework that trains a recurrent neural network for autonomous task execution
Stars: ✭ 71 (+144.83%)
Mutual labels:  recurrent-neural-networks
Deep-Learning-A-Z-Hands-on-Artificial-Neural-Network
Codes and Templates from the SuperDataScience Course
Stars: ✭ 39 (+34.48%)
Mutual labels:  recurrent-neural-networks
sequence labeling tf
Sequence Labeling in Tensorflow
Stars: ✭ 18 (-37.93%)
Mutual labels:  recurrent-neural-networks
Probabilistic-RNN-DA-Classifier
Probabilistic Dialogue Act Classification for the Switchboard Corpus using an LSTM model
Stars: ✭ 22 (-24.14%)
Mutual labels:  recurrent-neural-networks
AC-VRNN
PyTorch code for CVIU paper "AC-VRNN: Attentive Conditional-VRNN for Multi-Future Trajectory Prediction"
Stars: ✭ 21 (-27.59%)
Mutual labels:  recurrent-neural-networks
iust deep fuzz
Advanced file format fuzzer based-on deep neural language models.
Stars: ✭ 36 (+24.14%)
Mutual labels:  recurrent-neural-networks
pomdp-baselines
Simple (but often Strong) Baselines for POMDPs in PyTorch - ICML 2022
Stars: ✭ 162 (+458.62%)
Mutual labels:  recurrent-neural-networks
unicornn
Official code for UnICORNN (ICML 2021)
Stars: ✭ 21 (-27.59%)
Mutual labels:  recurrent-neural-networks

Keras Ordered Neurons LSTM

Version

[中文|English]

Unofficial implementation of ON-LSTM.

Install

pip install keras-ordered-neurons

Usage

Basic

Same as LSTM except that an extra argument chunk_size should be given:

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Embedding, Bidirectional, Dense

from keras_ordered_neurons import ONLSTM

model = Sequential()
model.add(Embedding(input_shape=(None,), input_dim=10, output_dim=100))
model.add(Bidirectional(ONLSTM(units=50, chunk_size=5)))
model.add(Dense(units=2, activation='softmax'))
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy')
model.summary()

DropConnect

Set recurrent_dropconnect to a non-zero value to enable drop-connect for recurrent weights:

from keras_ordered_neurons import ONLSTM

ONLSTM(units=50, chunk_size=5, recurrent_dropconnect=0.2)

Expected Split Points

Set return_splits to True if you want to know the expected split points of master forget gate and master input gate.

from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Embedding

from keras_ordered_neurons import ONLSTM

inputs = Input(shape=(None,))
embed = Embedding(input_dim=10, output_dim=100)(inputs)
outputs, splits = ONLSTM(units=50, chunk_size=5, return_sequences=True, return_splits=True)(embed)
model = Model(inputs=inputs, outputs=splits)
model.compile(optimizer='adam', loss='mse')
model.summary(line_length=120)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].