@@ -58,7 +58,30 @@ def build(self, rgb, net_type='fcn_32s', train=False, num_classes=20,
58
58
59
59
with tf .variable_scope ('vgg_16' , values = [bgr ]) as sc :
60
60
with slim .arg_scope ([slim .conv2d , slim .fully_connected , slim .max_pool2d ]):
61
- # TODO 3: define vgg-16 network with fully convolutional layers
61
+ # Mission 7: define vgg-16 network with fully convolutional layers
62
+ self .conv1_2 = slim .repeat (bgr , 2 , slim .conv2d , 64 ,
63
+ [3 ,3 ], scope = 'conv1' )
64
+ self .pool1 = slim .max_pool2d (self .conv1_2 , [2 ,2 ], scope = 'pool1' )
65
+ '''
66
+ Fill in the blank
67
+ '''
68
+ self .conv2_2 =
69
+ self .pool2 =
70
+
71
+ self .conv3_3 =
72
+ self .pool3 =
73
+
74
+ self .conv4_3 =
75
+ self .pool4 =
76
+
77
+ self .conv5_3 =
78
+ self .pool5 =
79
+
80
+ self .fc6 = slim .conv2d (self .pool5 , 4096 , [7 ,7 ], padding = 'SAME' , scope = 'fc6' )
81
+ self .fc6 = slim .dropout (self .fc6 , 0.5 , is_training = train , scope = 'dropout6' )
82
+
83
+ self .fc7 = slim .conv2d (self .fc6 , 4096 , [1 ,1 ], padding = 'SAME' , scope = 'fc7' )
84
+ self .fc7 = slim .dropout (self .fc7 , 0.5 , is_training = train , scope = 'dropout7' )
62
85
63
86
self .score_fr = slim .conv2d (self .fc7 , num_classes , [1 ,1 ], padding = 'SAME' ,
64
87
activation_fn = None , normalizer_fn = None , scope = 'score_fr' )
@@ -72,13 +95,12 @@ def build(self, rgb, net_type='fcn_32s', train=False, num_classes=20,
72
95
name = 'up' , factor = 32 )
73
96
74
97
elif net_type == 'fcn_16s' :
75
- # TODO 4 : implement fcn_16s
98
+ # Mission 8 : implement fcn_16s
76
99
TODO = True
77
100
elif net_type == 'fcn_8s' :
78
- # TODO 4 : implement fcn_8s
101
+ # Mission 9 : implement fcn_8s
79
102
TODO = True
80
103
else :
81
- # TODO 5: implement deconvNet
82
104
TODO = True
83
105
84
106
self .pred_up = tf .argmax (self .upscore , dimension = 3 )
0 commit comments