<gh_stars>0
# imports for examples
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from model import TCNPredictor
from torchtest import test_suite

batch_size, horizon, seq_len, features, n_nodes = 1, 12, 12, 1, 325
inputs = Variable(torch.randn(batch_size, features, n_nodes, seq_len))
targets = Variable(torch.randn(batch_size, n_nodes, horizon))
batch = [inputs, targets]

model = TCNPredictor(adjs=torch.eye(n_nodes))
loss_fn = F.mse_loss
optim = model.configure_optimizers()


def test_value_change():
    return test_suite(model, loss_fn, optim, batch, test_vars_change=True)


def test_NaN():
    return test_suite(model, loss_fn, optim, batch, test_nan_vals=True)


def test_inf():
    return test_suite(model, loss_fn, optim, batch, test_inf_vals=True)

# imports for examples
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from model import TCNPredictor
from torchtest import test_suite

batch_size, horizon, seq_len, features, n_nodes = 1, 12, 12, 1, 325
inputs = Variable(torch.randn(batch_size, features, n_nodes, seq_len))
targets = Variable(torch.randn(batch_size, n_nodes, horizon))
batch = [inputs, targets]

model = TCNPredictor(adjs=torch.eye(n_nodes))
loss_fn = F.mse_loss
optim = model.configure_optimizers()


def test_value_change():
    return test_suite(model, loss_fn, optim, batch, test_vars_change=True)


def test_NaN():
    return test_suite(model, loss_fn, optim, batch, test_nan_vals=True)


def test_inf():
    return test_suite(model, loss_fn, optim, batch, test_inf_vals=True)
# imports for examples