diff --git a/openfl-workspace/torch_cnn_mnist/src/pt_cnn.py b/openfl-workspace/torch_cnn_mnist/src/pt_cnn.py index ac1a956bc3..ecd250733e 100644 --- a/openfl-workspace/torch_cnn_mnist/src/pt_cnn.py +++ b/openfl-workspace/torch_cnn_mnist/src/pt_cnn.py @@ -77,8 +77,6 @@ def init_network(self, fully-connected layer (Default = 500) **kwargs: Additional arguments to pass to the function - """ - ''' FIXME: We are tracking only side lengths (rather than length and width) as we are assuming square shapes for feature and kernels. @@ -91,8 +89,7 @@ def init_network(self, (Note this criterion held for the original input sizes considered for this model: 28x28 and 32x32 when used with the default values above) - - ''' + """ self.pool_sqrkernel_size = pool_sqrkernel_size channel = self.data_loader.get_feature_shape()[0] # (channel, dim1, dim2) self.conv1 = nn.Conv2d(channel, conv1_channels_out, conv_sqrkernel_size, 1) diff --git a/openfl/component/collaborator/collaborator.py b/openfl/component/collaborator/collaborator.py index 1fbf66b311..2efa513ca4 100644 --- a/openfl/component/collaborator/collaborator.py +++ b/openfl/component/collaborator/collaborator.py @@ -24,23 +24,21 @@ class DevicePolicy(Enum): class OptTreatment(Enum): - """Optimizer Methods.""" + """Optimizer Methods. - RESET = 1 - ''' - RESET tells each collaborator to reset the optimizer state at the beginning + - RESET tells each collaborator to reset the optimizer state at the beginning of each round. - ''' - CONTINUE_LOCAL = 2 - ''' - CONTINUE_LOCAL tells each collaborator to continue with the local optimizer + + - CONTINUE_LOCAL tells each collaborator to continue with the local optimizer state from the previous round. - ''' - CONTINUE_GLOBAL = 3 - ''' - CONTINUE_GLOBAL tells each collaborator to continue with the federally + + - CONTINUE_GLOBAL tells each collaborator to continue with the federally averaged optimizer state from the previous round. - ''' + """ + + RESET = 1 + CONTINUE_LOCAL = 2 + CONTINUE_GLOBAL = 3 class Collaborator: