What I really want is to seed the dataset and dataloader. I am adapting code from:

  
      gist.github.com
  
  
    https://gist.github.com/kevinzakka/d33bf8d6c7f06a9d8c76d97a7879f5cb 6
data_loader.py
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.

[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""

import torch
import numpy as np

This file has been truncated. show original
utils.py
import matplotlib.pyplot as plt

label_names = [
    'airplane',
    'automobile',
    'bird',
    'cat',
    'deer',
    'dog',
    'frog',
This file has been truncated. show original




  
  
    
    
  
  


Anyone know how to seed this properly? What are the best practices for seeding things in Pytorch.
Honestly, I have no idea if there is an algorithm specific way for GPU vs CPU. I care mostly about general pytorch and make sure my code is “truly random”. Specially when it uses GPU I guess…