def expanded_data_double_fc(n=100):
 (expanded_training_data, _, _) = network3.load_data_shared('../data/mnist_expanded.pkl.gz')
 for j in range(3):
  print ('Training with expanded data, %s neurons in two FC layers, run num %s' % (n, j))
  net = Network([ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2), activation_fn=ReLU), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2), activation_fn=ReLU), FullyConnectedLayer(n_in=((40 * 4) * 4), n_out=n, activation_fn=ReLU), FullyConnectedLayer(n_in=n, n_out=n, activation_fn=ReLU), SoftmaxLayer(n_in=n, n_out=10)], mini_batch_size)
  net.SGD(expanded_training_data, 60, mini_batch_size, 0.03, validation_data, test_data, lmbda=0.1)

def expanded_data_double_fc ( n = 100 ) : ( expanded_training_data , _ , _ ) = network3 . load_data_shared ( '../data/mnist_expanded.pkl.gz' ) for j in range ( 3 ) : print ( 'Training with expanded data, %s neurons in two FC layers, run num %s' % ( n , j ) ) net = Network ( [ ConvPoolLayer ( image_shape = ( mini_batch_size , 1 , 28 , 28 ) , filter_shape = ( 20 , 1 , 5 , 5 ) , poolsize = ( 2 , 2 ) , activation_fn = ReLU ) , ConvPoolLayer ( image_shape = ( mini_batch_size , 20 , 12 , 12 ) , filter_shape = ( 40 , 20 , 5 , 5 ) , poolsize = ( 2 , 2 ) , activation_fn = ReLU ) , FullyConnectedLayer ( n_in = ( ( 40 * 4 ) * 4 ) , n_out = n , activation_fn = ReLU ) , FullyConnectedLayer ( n_in = n , n_out = n , activation_fn = ReLU ) , SoftmaxLayer ( n_in = n , n_out = 10 ) ] , mini_batch_size ) net . SGD ( expanded_training_data , 60 , mini_batch_size , 0.03 , validation_data , test_data , lmbda = 0.1 )
n is the number of neurons in both fully-connected layers .