Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_disjoint_vanilla_test(dataset, n_tasks):
# no need to download the dataset again for this test (if it already exists)
input_folder = os.path.join(dir_data, 'Data')
Disjoint(path=input_folder, dataset=dataset, tasks_number=n_tasks, download=False, train=False)
check_task_sequences_files(scenario="Disjoint", folder=dir_data, n_tasks=n_tasks, dataset=dataset, train=False)
def test_download(tmpdir, dataset):
continuum = Disjoint(path=tmpdir, dataset=dataset, tasks_number=1, download=False, train=True)
if continuum is None:
raise AssertionError("Object construction has failed")
def test_disjoint_vanilla_train(dataset, n_tasks):
# no need to download the dataset again for this test (if it already exists)
input_folder = os.path.join(dir_data, 'Data')
Disjoint(path=input_folder, dataset=dataset, tasks_number=n_tasks, download=False, train=True)
check_task_sequences_files(scenario="Disjoint", folder=dir_data, n_tasks=n_tasks, dataset=dataset, train=True)
def __init__(self, path="./Data", dataset="MNIST", tasks_number=1, download=False, train=True):
super(Disjoint, self).__init__(path=path,
dataset=dataset,
tasks_number=tasks_number,
scenario="Disjoint",
download=download,
train=train,
num_classes=10)