// otherwise load it from scratch and perform necessary adaptations (e.g.
// reducing dataset size for reshaping according to network architecture).
// Then save it to disk.
datadir_base = os.path.expanduser(os.path.join("~", ".snntoolbox"))
datadir = os.path.join(datadir_base, "datasets", settings["dataset"],
settings["architecture"])
if not os.path.exists(datadir):
os.makedirs(datadir)
samples = os.path.join(datadir, settings["dataset"] + ".npy")
if os.path.isfile(samples):
(X_train, Y_train, X_test, Y_test) = tuple(np.load(samples))
else:
After Change
// ____________________________ LOAD DATASET _____________________________ //
(X_train, Y_train, X_test, Y_test) = load_dataset(settings["dataset_path"])
// _____________________________ LOAD MODEL ______________________________ //
// Extract architecture and weights from input model.