• Stars
    star
    399
  • Rank 105,501 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A ConvLSTM cell with layer normalization and peepholes for TensorFlow's RNN API.

TensorFlow ConvLSTM Cell

A ConvLSTM cell for TensorFlow's RNN API.

import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

batch_size = 32
timesteps = 100
shape = [640, 480]
kernel = [3, 3]
channels = 3
filters = 12

# Create a placeholder for videos.
inputs = tf.placeholder(tf.float32, [batch_size, timesteps] + shape + [channels])

# Add the ConvLSTM step.
from cell import ConvLSTMCell
cell = ConvLSTMCell(shape, filters, kernel)
outputs, state = tf.nn.dynamic_rnn(cell, inputs, dtype=inputs.dtype)

# There's also a ConvGRUCell that is more memory efficient.
from cell import ConvGRUCell
cell = ConvGRUCell(shape, filters, kernel)
outputs, state = tf.nn.dynamic_rnn(cell, inputs, dtype=inputs.dtype)

# It's also possible to enter 2D input or 4D input instead of 3D.
shape = [100]
kernel = [3]
inputs = tf.placeholder(tf.float32, [batch_size, timesteps] + shape + [channels])
cell = ConvLSTMCell(shape, filters, kernel)
outputs, state = tf.nn.bidirectional_dynamic_rnn(cell, cell, inputs, dtype=inputs.dtype)

shape = [50, 50, 50]
kernel = [1, 3, 5]
inputs = tf.placeholder(tf.float32, [batch_size, timesteps] + shape + [channels])
cell = ConvGRUCell(shape, filters, kernel)
outputs, state= tf.nn.bidirectional_dynamic_rnn(cell, cell, inputs, dtype=inputs.dtype)

More Repositories

1

python-audio-effects

Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.
Python
380
star
2

audioscrape

Scrape audio from YouTube and SoundCloud with a simple command-line interface.
Python
81
star
3

ml-vst

(WIP) Create VST plugins with JUCE that run machine learning models.
C++
17
star
4

vscode-git-line-blame

Display inline information of the last commit that edited the currently selected line in the editor
TypeScript
12
star
5

dotfiles

My idiosyncratic config for personal computing
Nix
10
star
6

drum-transcriber

Convert audio recordings of drums into MIDI files with Hidden Markov Models.
MATLAB
10
star
7

ml-runtimes

Nix packages for interactive ML development
Nix
8
star
8

mirpkgs

Nix packages for reproducible MIR research
Nix
7
star
9

pmqd

Perceived Music Quality Dataset
Python
5
star
10

model-development-template

For developing new ML models with Jupyter Notebooks in VS Code
Makefile
2
star
11

meson-build-test

Testing Meson for fun and learnings
C
1
star
12

nix-pip-flake

Testing Python inside a venv with nix flakes
Nix
1
star
13

ipytoolbox

A collection of IPython magics and other utilities
Jupyter Notebook
1
star
14

music-loops-with-librosa

A little Streamlit app that lets visitors create music loops with librosa and NumPy
Python
1
star
15

msaf-encodec

Music structure analysis with deep embeddings
Jupyter Notebook
1
star
16

bark-example

Python
1
star
17

posesynth

Playing around with ml5.js
Svelte
1
star
18

leetspeaker

Make it easier being 1337 online with the leetspeaker.
Haskell
1
star
19

worms-speechbank-synthesis

Use LLMs to generate more speech lines in the classic PC game Worms
Jupyter Notebook
1
star
20

huggingface-evaluate-test

Just a little test of the evaluate package
1
star
21

motion-synth

Generate and visualize harmonic audio from a motion detected video stream with HTML5.
JavaScript
1
star
22

nix-jax-mnist

A toy example of training MNIST with JAX
Python
1
star