Skip to content

Instantly share code, notes, and snippets.

@AAnoosheh
AAnoosheh / phased_lstm.py
Last active February 13, 2023 11:49
Hasty-yet-functioning implementation of the PhasedLSTM model in Pytorch
import math
import torch
import torch.nn as nn
class PhasedLSTMCell(nn.Module):
"""Phased LSTM recurrent network cell.
https://arxiv.org/pdf/1610.09513v1.pdf