Data visualisation and statistics for CNN, RNN in pytorch

Hello,

l’m looking for tutorials and packages to make data visualization, statistics, chars for CNN, RNN. learning curves, ROC curve ,AUC …

THANK YOU

1 Like

Yeah…I also wanted to know how to draw these curves using matplotlib , like the training error/validation error vs the number of training examples

You can just save the loss while training / validating your models.

val_loss = 0
for batch_idx, (data, target) in enumerate(val_loader):
    data = Variable(data, volatile=True)
    target = Variable(target, volatile=True)

    output = model(data)

    loss = criterion(output, target)
    
    val_loss += loss.data.cpu().numpy()

val_loss /= len(val_loader)

Then append it to a list / np.array for each epoch and plot it with matplotlib.

1 Like

Like @ptrblck have said, calculate loss and accuracy on train and val set for each epoch and save these stats using lists and write it to a json or yaml file. After training process finishes, using matplotlib to plot the statistics.