Skip to content

Commit 2468281

Browse files
committed
final
1 parent 7b4d232 commit 2468281

File tree

3 files changed

+381
-146
lines changed

3 files changed

+381
-146
lines changed

bilinear_filter.ipynb

+26-142
Large diffs are not rendered by default.

bilinear_filter_sol.ipynb

+329
Large diffs are not rendered by default.

fcn_vgg.py

+26-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,30 @@ def build(self, rgb, net_type='fcn_32s', train=False, num_classes=20,
5858

5959
with tf.variable_scope('vgg_16', values=[bgr]) as sc:
6060
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')
6285

6386
self.score_fr = slim.conv2d(self.fc7, num_classes, [1,1], padding='SAME',
6487
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,
7295
name='up', factor=32)
7396

7497
elif net_type == 'fcn_16s':
75-
# TODO 4: implement fcn_16s
98+
# Mission 8: implement fcn_16s
7699
TODO = True
77100
elif net_type == 'fcn_8s':
78-
# TODO 4: implement fcn_8s
101+
# Mission 9: implement fcn_8s
79102
TODO = True
80103
else:
81-
# TODO 5: implement deconvNet
82104
TODO = True
83105

84106
self.pred_up = tf.argmax(self.upscore, dimension=3)

0 commit comments

Comments
 (0)