Skip to content

Instantly share code, notes, and snippets.

@spro
spro / pytorch-simple-rnn.py
Last active November 7, 2024 11:24
PyTorch RNN training example
import torch
import torch.nn as nn
from torch.nn import functional as F
from torch.autograd import Variable
from torch import optim
import numpy as np
import math, random
# Generating a noisy multi-sin wave