# Path: examples/utils.py
# def make_progressbar(prefix, data_size):
#     widgets = [prefix, ', processed ', _pb.Counter(), ' of ', str(data_size),
#                ' (', _pb.Percentage(), ')', ' ', _pb.Bar(), ' ', _pb.ETA()]
#     return _pb.ProgressBar(maxval=data_size, widgets=widgets)


import DeepFried2 as df
from examples.utils import make_progressbar
from train import train
from test import test
from model import net, lenet2




if __name__ == "__main__":
    print("THIS IS JUST AN EXAMPLE; DO NOT BASE DECISIONS ON THIS.")
    print("Please don't take these numbers as a benchmark.")
    print("A fair comparison would run all experiments multiple times AND RUN MORE THAN FIVE EPOCHS.")

    batch_size = 64

    (Xtrain, ytrain), (Xval, yval), (Xtest, ytest) = df.datasets.mnist.data()

    criterion = df.ClassNLLCriterion()

    def run(optim):

# Path: examples/utils.py
# def make_progressbar(prefix, data_size):
#     widgets = [prefix, ', processed ', _pb.Counter(), ' of ', str(data_size),
#                ' (', _pb.Percentage(), ')', ' ', _pb.Bar(), ' ', _pb.ETA()]
#     return _pb.ProgressBar(maxval=data_size, widgets=widgets)


# Path: examples/Optimizers/run.py
import DeepFried2 as df
from examples.utils import make_progressbar
from train import train
from test import test
from model import net, lenet2





if __name__ == "__main__":
    print("THIS IS JUST AN EXAMPLE; DO NOT BASE DECISIONS ON THIS.")
    print("Please don't take these numbers as a benchmark.")
    print("A fair comparison would run all experiments multiple times AND RUN MORE THAN FIVE EPOCHS.")

    batch_size = 64

    (Xtrain, ytrain), (Xval, yval), (Xtest, ytest) = df.datasets.mnist.data()

    criterion = df.ClassNLLCriterion()

    def run(optim):

        progress = make_progressbar('Training with ' + str(optim), 5)