multicnet.py
def build_network(self):
        """
        Sets up the deep neural network
        """

        # the input is going to be reshaped to a
        # 80x80 color image (4 channels)
        input_image = tf.placeholder("float", [None, self.input_width,
                                      self.input_height, self.nimages])

        # create the first convolutional layers
        h_pool1 = self.convolve_relu_pool(input_image, [8, 8, self.nimages, 32])
        h_conv2 = self.convolve_relu_pool(h_pool1, [4, 4, 32, 64], 2, False)
        h_conv3 = self.convolve_relu_pool(h_conv2, [3, 3, 64, 64], 1, False)

        # create the densely connected layers
        W_fc1, b_fc1 = self.build_weights_biases([5 * 5 * 64, 512])
        h_conv3_flat = tf.reshape(h_conv3, [-1, 5 * 5 * 64])
        h_fc1 = tf.nn.relu(tf.matmul(h_conv3_flat, W_fc1) + b_fc1)

        # finally add the readout layer
        W_fc2, b_fc2 = self.build_weights_biases([512, self.nchannels])
        readout = tf.matmul(h_fc1, W_fc2) + b_fc2

        readout_action = tf.reduce_sum(tf.mul(readout, self.a), reduction_indices=1)
        cost_function = tf.reduce_mean(tf.square(self.y - readout_action))
        train_step = tf.train.AdamOptimizer(1e-8).minimize(cost_function)

        return input_image, readout, h_fc1, train_step

        Sets up the deep neural network
        
Sets up the deep neural network
Sets up the deep neural network
def build_network(self):
        input_image = tf.placeholder("float", [None, self.input_width,
                                      self.input_height, self.nimages])
        h_pool1 = self.convolve_relu_pool(input_image, [8, 8, self.nimages, 32])
        h_conv2 = self.convolve_relu_pool(h_pool1, [4, 4, 32, 64], 2, False)
        h_conv3 = self.convolve_relu_pool(h_conv2, [3, 3, 64, 64], 1, False)
        W_fc1, b_fc1 = self.build_weights_biases([5 * 5 * 64, 512])
        h_conv3_flat = tf.reshape(h_conv3, [-1, 5 * 5 * 64])
        h_fc1 = tf.nn.relu(tf.matmul(h_conv3_flat, W_fc1) + b_fc1)
        W_fc2, b_fc2 = self.build_weights_biases([512, self.nchannels])
        readout = tf.matmul(h_fc1, W_fc2) + b_fc2
        readout_action = tf.reduce_sum(tf.mul(readout, self.a), reduction_indices=1)
        cost_function = tf.reduce_mean(tf.square(self.y - readout_action))
        train_step = tf.train.AdamOptimizer(1e-8).minimize(cost_function)
        return input_image, readout, h_fc1, train_step
def build_network ( self ) : input_image = tf . placeholder ( "float" , [ None , self . input_width , self . input_height , self . nimages ] ) h_pool1 = self . convolve_relu_pool ( input_image , [ 8 , 8 , self . nimages , 32 ] ) h_conv2 = self . convolve_relu_pool ( h_pool1 , [ 4 , 4 , 32 , 64 ] , 2 , False ) h_conv3 = self . convolve_relu_pool ( h_conv2 , [ 3 , 3 , 64 , 64 ] , 1 , False ) W_fc1 , b_fc1 = self . build_weights_biases ( [ 5 * 5 * 64 , 512 ] ) h_conv3_flat = tf . reshape ( h_conv3 , [ - 1 , 5 * 5 * 64 ] ) h_fc1 = tf . nn . relu ( tf . matmul ( h_conv3_flat , W_fc1 ) + b_fc1 ) W_fc2 , b_fc2 = self . build_weights_biases ( [ 512 , self . nchannels ] ) readout = tf . matmul ( h_fc1 , W_fc2 ) + b_fc2 readout_action = tf . reduce_sum ( tf . mul ( readout , self . a ) , reduction_indices = 1 ) cost_function = tf . reduce_mean ( tf . square ( self . y - readout_action ) ) train_step = tf . train . AdamOptimizer ( 1e-8 ) . minimize ( cost_function ) return input_image , readout , h_fc1 , train_step
Sets up the deep neural network
Sets up the deep neural network
"""
        Sets up the deep neural network
        """ # the input is going to be reshaped to a # 80x80 color image (4 channels) # create the first convolutional layers # create the densely connected layers # finally add the readout layer
self