<jupyter_start><jupyter_text>Class Model Visualisation<jupyter_code>tf.reset_default_graph()
with tf.variable_scope("Inputs") as scope:
    image = tf.Variable(initial_value=tf.random_normal(shape=[1, IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_DEPTH]),name="Image")
    keep_probs = tf.placeholder(dtype=tf.float32,name="keep_probs")
## Assembling the graph
graph = {} 
graph['conv1_1']  = vgg._conv_relu(vgg_layers, image, 0, 'conv1_1')
graph['conv1_2']  = vgg._conv_relu(vgg_layers, graph['conv1_1'], 2, 'conv1_2')
graph['avgpool1'] = vgg._avg_pool(graph['conv1_2'],'avgpool1')
graph['conv2_1']  = vgg._conv_relu(vgg_layers, graph['avgpool1'], 5, 'conv2_1')
graph['conv2_2']  = vgg._conv_relu(vgg_layers, graph['conv2_1'], 7, 'conv2_2')
graph['avgpool2'] = vgg._avg_pool(graph['conv2_2'],'avgpool2')
graph['conv3_1']  = vgg._conv_relu(vgg_layers, graph['avgpool2'], 10, 'conv3_1')
graph['conv3_2']  = vgg._conv_relu(vgg_layers, graph['conv3_1'], 12, 'conv3_2')
graph['conv3_3']  = vgg._conv_relu(vgg_layers, graph['conv3_2'], 14, 'conv3_3')
graph['conv3_4']  = vgg._conv_relu(vgg_layers, graph['conv3_3'], 16, 'conv3_4')
graph['avgpool3'] = vgg._avg_pool(graph['conv3_4'],'avgpool3')
graph['conv4_1']  = vgg._conv_relu(vgg_layers, graph['avgpool3'], 19, 'conv4_1')
graph['conv4_2']  = vgg._conv_relu(vgg_layers, graph['conv4_1'], 21, 'conv4_2')
graph['conv4_3']  = vgg._conv_relu(vgg_layers, graph['conv4_2'], 23, 'conv4_3')
graph['conv4_4']  = vgg._conv_relu(vgg_layers, graph['conv4_3'], 25, 'conv4_4')
graph['avgpool4'] = vgg._avg_pool(graph['conv4_4'],'avgpool4')
graph['conv5_1']  = vgg._conv_relu(vgg_layers, graph['avgpool4'], 28, 'conv5_1')
graph['conv5_2']  = vgg._conv_relu(vgg_layers, graph['conv5_1'], 30, 'conv5_2')
graph['conv5_3']  = vgg._conv_relu(vgg_layers, graph['conv5_2'], 32, 'conv5_3')
graph['conv5_4']  = vgg._conv_relu(vgg_layers, graph['conv5_3'], 34, 'conv5_4')
graph['avgpool5'] = vgg._avg_pool(graph['conv5_4'],'avgpool5')
graph['fc6'] = _fully_connected(vgg_layers, graph['avgpool5'], 37, 'fc6')
graph['dropout1'] = _dropout(graph['fc6'],keep_probs,'dropout1')
graph['fc7'] = _fully_connected(vgg_layers, graph['dropout1'], 39, 'fc7')
graph['dropout2'] = _dropout(graph['fc7'], keep_probs, 'dropout2')
graph['fc8'] = _fully_connected(vgg_layers, graph['dropout2'], 41, 'fc8')
graph['score'] = graph['fc8'][0,class_arg]
graph['loss'] = loss(image, graph['score'], reg_param=0.1)
graph['optimizer'] = _optimizer(graph['loss'])
N_EPOCHS = 20
with tf.Session() as sess:
    init = tf.global_variables_initializer()
    sess.run(init)
    
    for i in range(N_EPOCHS):
        
        _, l, score = sess.run([graph['optimizer'], graph['loss'], graph['score']], 
                       feed_dict = {keep_probs:0.5})
        print 'Epoch: {}\tLoss: {}\tScore: {}'.format(i+1, l, score)<jupyter_output>Epoch: 1	Loss: -150530.078125	Score: 0.0
Epoch: 2	Loss: -150289.828125	Score: 0.0
Epoch: 3	Loss: -150050.015625	Score: 0.0705909729004
Epoch: 4	Loss: -149810.40625	Score: 0.0
Epoch: 5	Loss: -149571.234375	Score: 0.0
Epoch: 6	Loss: -149332.265625	Score: 0.0
Epoch: 7	Loss: -149093.75	Score: 0.0
Epoch: 8	Loss: -148855.515625	Score: 0.0
Epoch: 9	Loss: -148617.59375	Score: 0.0
Epoch: 10	Loss: -148380.03125	Score: 0.0
Epoch: 11	Loss: -148142.71875	Score: 0.0
Epoch: 12	Loss: -147905.609375	Score: 0.336689054966
Epoch: 13	Loss: -147669.03125	Score: 0.380449056625
Epoch: 14	Loss: -147433.21875	Score: 0.0
Epoch: 15	Loss: -147197.359375	Score: 0.0
Epoch: 16	Loss: -146961.921875	Score: 0.0
Epoch: 17	Loss: -146726.859375	Score: 0.0
Epoch: 18	Loss: -146492.125	Score: 0.0
Epoch: 19	Loss: -146257.84375	Score: 0.0
Epoch: 20	Loss: -146023.828125	Score: 0.0
{'fraction_non_alphanumeric': 0.18838604143947654, 'fraction_numerical': 0.13685932388222466, 'mean_word_length': 6.208251473477406, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '248228', 'license': 'MIT', 'n_tokens_mistral': 1886, 'n_tokens_neox': 1625, 'n_words': 283, 'path': 'enlightened/Untitled.ipynb', 'repo_name': 'najeeb97khan/ConvNets', 'size': '3668'}