diff --git a/config.ini b/config.ini index 492a4c423d5b35efe0d236bef5de870f2645c881..07a6d9b754c8bb52f654f77aafe7c1053c8912b1 100644 --- a/config.ini +++ b/config.ini @@ -16,7 +16,7 @@ lr = 0.01 [TRAIN_PARAMS] training_package = decentralizepy.training.Training training_class = Training -epochs_per_round = 1 +epochs_per_round = 5 batch_size = 1024 shuffle = True loss_package = torch.nn diff --git a/src/decentralizepy/datasets/Femnist.py b/src/decentralizepy/datasets/Femnist.py index ccafb16c2e42d38737a6b23362373f1696e9c9ca..13cbff27c335ee060233007f93c0de4981ebf673 100644 --- a/src/decentralizepy/datasets/Femnist.py +++ b/src/decentralizepy/datasets/Femnist.py @@ -116,6 +116,8 @@ class Femnist(Dataset): self.train_y = np.array(my_train_data["y"], dtype=np.dtype("int64")).reshape(-1) logging.debug("train_x.shape: %s", str(self.train_x.shape)) logging.debug("train_y.shape: %s", str(self.train_y.shape)) + assert self.train_x.shape[0] == self.train_y.shape[0] + assert self.train_x.shape[0] > 0 def load_testset(self): logging.info("Loading testing set.") @@ -135,6 +137,8 @@ class Femnist(Dataset): self.test_y = np.array(test_y, dtype=np.dtype("int64")).reshape(-1) logging.debug("test_x.shape: %s", str(self.test_x.shape)) logging.debug("test_y.shape: %s", str(self.test_y.shape)) + assert self.test_x.shape[0] == self.test_y.shape[0] + assert self.test_x.shape[0] > 0 def __init__( self, diff --git a/testing.py b/testing.py index 5a50a3b21450c45dcbf70347525f414604752d01..0d27c9b7071bea6e0620d836ee3f78ec12a9de2f 100644 --- a/testing.py +++ b/testing.py @@ -42,5 +42,5 @@ if __name__ == "__main__": mp.spawn( fn=Node, nprocs=procs_per_machine, - args=[m_id, l, g, my_config, 20, "results", logging.DEBUG], + args=[m_id, l, g, my_config, 20, "results", logging.INFO], )