def save_history(self, fname):
    f_train = open(fname, 'wb')
    training_data = [self._losses, self._diffs, self._updates]
    pickle.dump(training_data, f_train)
    f_train.close()
def save_history(self, fname):
    f_train = open(fname, 'wb')
    training_data = [self._losses, self._diffs, self._updates]
    pickle.dump(training_data, f_train)
    f_train.close()