human
Write me a the Python code you requested given the following:
I am working on the file "LeNet5.ipynb".
The first task is:
Fully Connected Layer
The Fully Connected layer is a traditional Multi Layer Perceptron hence we need to take into account the following arguments:
<b>input:</b> The input feature map
<br><b>n_in:</b> The number of input neurons 
<br><b>n_out:</b> The number of output neurons.
<br><b>W:</b> (Optional) Load pretrained weights
<br><b>b:</b> (Optional) Load pretrained biases.
<br><b>activation_fn:</b> A nonlinear function used to transform our input.
generally representing the rate of action potential firing for a given pixel. The purpose of which is to ensure that the representation in the input is mapped to a different space in the output.
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class FC(object):

    def __init__(self, input, n_in, n_out, W=None, b=None, seed=35,
                 activation_fn=None):

        # rng = np.random.RandomState(seed)

        self.input = input

        if W is None:
            W_values = np.random.uniform(low=-np.sqrt(6./(n_in+n_out)),
                                   high=np.sqrt(6./(n_in+n_out)),
                                   size=(n_out, n_in)).astype(theano.config.floatX)

            if activation_fn == theano.tensor.nnet.sigmoid:
                W_values *= 4

            W = theano.shared(name='Weights', value=W_values, borrow=True)

        if b is None:
            b_values = np.zeros(n_out, dtype=theano.config.floatX)
            b = theano.shared(name='bias', value=b_values, borrow=True)

        self.W = W
        self.b = b

        l_output = (T.dot(self.W, input.T)).T + self.b
        self.output = (l_output if activation_fn is None 
                       else activation_fn(l_output))

        self.params = [self.W, self.b]