Skip to content

Instantly share code, notes, and snippets.

View zjplab's full-sized avatar
🏠
Working from home

JP Zhang zjplab

🏠
Working from home
View GitHub Profile
@zjplab
zjplab / sru.py
Last active January 11, 2020 22:51 — forked from calclavia/sru.py
Pure Pytorch Implementation of SRU
import torch.nn as nn
import torch
class SRU(nn.Module):
""" Simple Recurrent Unit https://arxiv.org/pdf/1709.02755.pdf """
def __init__(self, input_size, hidden_size, activation=F.tanh):
super().__init__()
self.input_size = input_size
self.hidden_size = hidden_size
@zjplab
zjplab / 0_reuse_code.js
Created January 28, 2017 14:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console