Skip to content

Instantly share code, notes, and snippets.

@BassyKuo
Last active June 15, 2018 06:26
Show Gist options
  • Save BassyKuo/7b3645c3744e3b833de49cb7fa460427 to your computer and use it in GitHub Desktop.
Save BassyKuo/7b3645c3744e3b833de49cb7fa460427 to your computer and use it in GitHub Desktop.
DeepLab

DeepLab-LargeFOV

code from https://github.com/DrSleep/tensorflow-deeplab-lfov/blob/master/deeplab_lfov/model.py

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]
KEYPOINT
  1. exploits atrous_conv to increase the field-of-view
  2. # of filters in fc6 and fc7 is reduced from 4096 to 1024 (for running faster)
  3. omits the last pooling layers to keep the downsampling ratio of 8
ARCHITECTURE (based on VGG16)
# The DeepLab-LargeFOV model can be represented as follows:
imageinput -> conv1: [conv-relu](dilation=1, channels=64)  x 2 -> [max_pool](stride=2)
           -> conv2: [conv-relu](dilation=1, channels=128) x 2 -> [max_pool](stride=2)
           -> conv3: [conv-relu](dilation=1, channels=256) x 3 -> [max_pool](stride=2)
           -> conv4: [conv-relu](dilation=1, channels=512) x 3 -> [max_pool](stride=1)
           -> conv5: [conv-relu](dilation=2, channels=512) x 3 -> [max_pool](stride=1) -> [avg_pool](stride=1)
           -> fc6: [conv-relu](dilation=12, channels=1024) -> [dropout]
           -> fc7: [conv-relu](dilation=1,  channels=1024) -> [dropout]
           -> fc8: [conv-relu](dilation=1,  channels=21)   -> [pixel-wise softmax loss].

1. Import VGG16-like architecture

conv1_1/w            (3, 3, 3, 64)
conv1_1/b            (64,)
conv1_2/w            (3, 3, 64, 64)
conv1_2/b            (64,)
conv2_1/w            (3, 3, 64, 128)
conv2_1/b            (128,)
conv2_2/w            (3, 3, 128, 128)
conv2_2/b            (128,)
conv3_1/w            (3, 3, 128, 256)
conv3_1/b            (256,)
conv3_2/w            (3, 3, 256, 256)
conv3_2/b            (256,)
conv3_3/w            (3, 3, 256, 256)
conv3_3/b            (256,)
conv4_1/w            (3, 3, 256, 512)
conv4_1/b            (512,)
conv4_2/w            (3, 3, 512, 512)
conv4_2/b            (512,)
conv4_3/w            (3, 3, 512, 512)
conv4_3/b            (512,)
conv5_1/w            (3, 3, 512, 512)
conv5_1/b            (512,)
conv5_2/w            (3, 3, 512, 512)
conv5_2/b            (512,)
conv5_3/w            (3, 3, 512, 512)
conv5_3/b            (512,)
fc6/w                (3, 3, 512, 1024)
fc6/b                (1024,)
fc7/w                (1, 1, 1024, 1024)
fc7/b                (1024,)
fc8_voc12/w          (1, 1, 1024, 21)
fc8_voc12/b          (21,)

2. Training from random values, or using pre-trained weights

DeepLabV2_Res101

code from https://github.com/DrSleep/tensorflow-deeplab-resnet

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]
KEYPOINT
  1. exploits atrous_conv to increase the field-of-view
  2. atrous spatial pyramid pooling (ASPP)

1. Import Resnet101 architecture

  • Conv2D means convolution (dilation=1)

  • [res4a/4b] convolution means convolution (dilation=2)

  • [res5a/5b/5c] convolution means convolution (dilation=4)

  • [fc1_voc12_c0] convolution means convolution (dilation=6)

  • [fc1_voc12_c1] convolution means convolution (dilation=12)

  • [fc1_voc12_c2] convolution means convolution (dilation=18)

  • [fc1_voc12_c3] convolution means convolution (dilation=24)

  • ASPP: ASPP

  • whole:

Placeholder                                        Tensor("Placeholder:0", shape=(1, 224, 224, 3), dtype=float32)
conv1/Conv2D                                       Tensor("conv1/Conv2D:0", shape=(1, 112, 112, 64), dtype=float32)
bn_conv1/bn_conv1/Relu                             Tensor("bn_conv1/bn_conv1/Relu:0", shape=(1, 112, 112, 64), dtype=float32)
pool1                                              Tensor("pool1:0", shape=(1, 56, 56, 64), dtype=float32)
res2a_branch1/Conv2D                               Tensor("res2a_branch1/Conv2D:0", shape=(1, 56, 56, 256), dtype=float32)
bn2a_branch1/bn2a_branch1/Identity                 Tensor("bn2a_branch1/bn2a_branch1/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
pool1                                              Tensor("pool1:0", shape=(1, 56, 56, 64), dtype=float32)
res2a_branch2a/Conv2D                              Tensor("res2a_branch2a/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2a_branch2a/bn2a_branch2a/Relu                   Tensor("bn2a_branch2a/bn2a_branch2a/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2a_branch2b/Conv2D                              Tensor("res2a_branch2b/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2a_branch2b/bn2a_branch2b/Relu                   Tensor("bn2a_branch2b/bn2a_branch2b/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2a_branch2c/Conv2D                              Tensor("res2a_branch2c/Conv2D:0", shape=(1, 56, 56, 256), dtype=float32)
bn2a_branch2c/bn2a_branch2c/Identity               Tensor("bn2a_branch2c/bn2a_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
bn2a_branch1/bn2a_branch1/Identity                 Tensor("bn2a_branch1/bn2a_branch1/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
bn2a_branch2c/bn2a_branch2c/Identity               Tensor("bn2a_branch2c/bn2a_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
res2a                                              Tensor("res2a:0", shape=(1, 56, 56, 256), dtype=float32)
res2a_relu                                         Tensor("res2a_relu:0", shape=(1, 56, 56, 256), dtype=float32)
res2b_branch2a/Conv2D                              Tensor("res2b_branch2a/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2b_branch2a/bn2b_branch2a/Relu                   Tensor("bn2b_branch2a/bn2b_branch2a/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2b_branch2b/Conv2D                              Tensor("res2b_branch2b/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2b_branch2b/bn2b_branch2b/Relu                   Tensor("bn2b_branch2b/bn2b_branch2b/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2b_branch2c/Conv2D                              Tensor("res2b_branch2c/Conv2D:0", shape=(1, 56, 56, 256), dtype=float32)
bn2b_branch2c/bn2b_branch2c/Identity               Tensor("bn2b_branch2c/bn2b_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
res2a_relu                                         Tensor("res2a_relu:0", shape=(1, 56, 56, 256), dtype=float32)
bn2b_branch2c/bn2b_branch2c/Identity               Tensor("bn2b_branch2c/bn2b_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
res2b                                              Tensor("res2b:0", shape=(1, 56, 56, 256), dtype=float32)
res2b_relu                                         Tensor("res2b_relu:0", shape=(1, 56, 56, 256), dtype=float32)
res2c_branch2a/Conv2D                              Tensor("res2c_branch2a/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2c_branch2a/bn2c_branch2a/Relu                   Tensor("bn2c_branch2a/bn2c_branch2a/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2c_branch2b/Conv2D                              Tensor("res2c_branch2b/Conv2D:0", shape=(1, 56, 56, 64), dtype=float32)
bn2c_branch2b/bn2c_branch2b/Relu                   Tensor("bn2c_branch2b/bn2c_branch2b/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
res2c_branch2c/Conv2D                              Tensor("res2c_branch2c/Conv2D:0", shape=(1, 56, 56, 256), dtype=float32)
bn2c_branch2c/bn2c_branch2c/Identity               Tensor("bn2c_branch2c/bn2c_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
res2b_relu                                         Tensor("res2b_relu:0", shape=(1, 56, 56, 256), dtype=float32)
bn2c_branch2c/bn2c_branch2c/Identity               Tensor("bn2c_branch2c/bn2c_branch2c/Identity:0", shape=(1, 56, 56, 256), dtype=float32)
res2c                                              Tensor("res2c:0", shape=(1, 56, 56, 256), dtype=float32)
res2c_relu                                         Tensor("res2c_relu:0", shape=(1, 56, 56, 256), dtype=float32)
res3a_branch1/Conv2D                               Tensor("res3a_branch1/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn3a_branch1/bn3a_branch1/Identity                 Tensor("bn3a_branch1/bn3a_branch1/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res2c_relu                                         Tensor("res2c_relu:0", shape=(1, 56, 56, 256), dtype=float32)
res3a_branch2a/Conv2D                              Tensor("res3a_branch2a/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3a_branch2a/bn3a_branch2a/Relu                   Tensor("bn3a_branch2a/bn3a_branch2a/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3a_branch2b/Conv2D                              Tensor("res3a_branch2b/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3a_branch2b/bn3a_branch2b/Relu                   Tensor("bn3a_branch2b/bn3a_branch2b/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3a_branch2c/Conv2D                              Tensor("res3a_branch2c/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn3a_branch2c/bn3a_branch2c/Identity               Tensor("bn3a_branch2c/bn3a_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
bn3a_branch1/bn3a_branch1/Identity                 Tensor("bn3a_branch1/bn3a_branch1/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
bn3a_branch2c/bn3a_branch2c/Identity               Tensor("bn3a_branch2c/bn3a_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3a                                              Tensor("res3a:0", shape=(1, 28, 28, 512), dtype=float32)
res3a_relu                                         Tensor("res3a_relu:0", shape=(1, 28, 28, 512), dtype=float32)
res3b1_branch2a/Conv2D                             Tensor("res3b1_branch2a/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b1_branch2a/bn3b1_branch2a/Relu                 Tensor("bn3b1_branch2a/bn3b1_branch2a/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b1_branch2b/Conv2D                             Tensor("res3b1_branch2b/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b1_branch2b/bn3b1_branch2b/Relu                 Tensor("bn3b1_branch2b/bn3b1_branch2b/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b1_branch2c/Conv2D                             Tensor("res3b1_branch2c/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b1_branch2c/bn3b1_branch2c/Identity             Tensor("bn3b1_branch2c/bn3b1_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3a_relu                                         Tensor("res3a_relu:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b1_branch2c/bn3b1_branch2c/Identity             Tensor("bn3b1_branch2c/bn3b1_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3b1                                             Tensor("res3b1:0", shape=(1, 28, 28, 512), dtype=float32)
res3b1_relu                                        Tensor("res3b1_relu:0", shape=(1, 28, 28, 512), dtype=float32)
res3b2_branch2a/Conv2D                             Tensor("res3b2_branch2a/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b2_branch2a/bn3b2_branch2a/Relu                 Tensor("bn3b2_branch2a/bn3b2_branch2a/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b2_branch2b/Conv2D                             Tensor("res3b2_branch2b/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b2_branch2b/bn3b2_branch2b/Relu                 Tensor("bn3b2_branch2b/bn3b2_branch2b/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b2_branch2c/Conv2D                             Tensor("res3b2_branch2c/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b2_branch2c/bn3b2_branch2c/Identity             Tensor("bn3b2_branch2c/bn3b2_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3b1_relu                                        Tensor("res3b1_relu:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b2_branch2c/bn3b2_branch2c/Identity             Tensor("bn3b2_branch2c/bn3b2_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3b2                                             Tensor("res3b2:0", shape=(1, 28, 28, 512), dtype=float32)
res3b2_relu                                        Tensor("res3b2_relu:0", shape=(1, 28, 28, 512), dtype=float32)
res3b3_branch2a/Conv2D                             Tensor("res3b3_branch2a/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b3_branch2a/bn3b3_branch2a/Relu                 Tensor("bn3b3_branch2a/bn3b3_branch2a/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b3_branch2b/Conv2D                             Tensor("res3b3_branch2b/Conv2D:0", shape=(1, 28, 28, 128), dtype=float32)
bn3b3_branch2b/bn3b3_branch2b/Relu                 Tensor("bn3b3_branch2b/bn3b3_branch2b/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
res3b3_branch2c/Conv2D                             Tensor("res3b3_branch2c/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b3_branch2c/bn3b3_branch2c/Identity             Tensor("bn3b3_branch2c/bn3b3_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3b2_relu                                        Tensor("res3b2_relu:0", shape=(1, 28, 28, 512), dtype=float32)
bn3b3_branch2c/bn3b3_branch2c/Identity             Tensor("bn3b3_branch2c/bn3b3_branch2c/Identity:0", shape=(1, 28, 28, 512), dtype=float32)
res3b3                                             Tensor("res3b3:0", shape=(1, 28, 28, 512), dtype=float32)
res3b3_relu                                        Tensor("res3b3_relu:0", shape=(1, 28, 28, 512), dtype=float32)
res4a_branch1/Conv2D                               Tensor("res4a_branch1/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4a_branch1/bn4a_branch1/Identity                 Tensor("bn4a_branch1/bn4a_branch1/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res3b3_relu                                        Tensor("res3b3_relu:0", shape=(1, 28, 28, 512), dtype=float32)
res4a_branch2a/Conv2D                              Tensor("res4a_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4a_branch2a/bn4a_branch2a/Relu                   Tensor("bn4a_branch2a/bn4a_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4a_branch2b/convolution/BatchToSpaceND          Tensor("res4a_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4a_branch2b/bn4a_branch2b/Relu                   Tensor("bn4a_branch2b/bn4a_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4a_branch2c/Conv2D                              Tensor("res4a_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4a_branch2c/bn4a_branch2c/Identity               Tensor("bn4a_branch2c/bn4a_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4a_branch1/bn4a_branch1/Identity                 Tensor("bn4a_branch1/bn4a_branch1/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4a_branch2c/bn4a_branch2c/Identity               Tensor("bn4a_branch2c/bn4a_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4a                                              Tensor("res4a:0", shape=(1, 28, 28, 1024), dtype=float32)
res4a_relu                                         Tensor("res4a_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b1_branch2a/Conv2D                             Tensor("res4b1_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b1_branch2a/bn4b1_branch2a/Relu                 Tensor("bn4b1_branch2a/bn4b1_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b1_branch2b/convolution/BatchToSpaceND         Tensor("res4b1_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b1_branch2b/bn4b1_branch2b/Relu                 Tensor("bn4b1_branch2b/bn4b1_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b1_branch2c/Conv2D                             Tensor("res4b1_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b1_branch2c/bn4b1_branch2c/Identity             Tensor("bn4b1_branch2c/bn4b1_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4a_relu                                         Tensor("res4a_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b1_branch2c/bn4b1_branch2c/Identity             Tensor("bn4b1_branch2c/bn4b1_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b1                                             Tensor("res4b1:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b1_relu                                        Tensor("res4b1_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b2_branch2a/Conv2D                             Tensor("res4b2_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b2_branch2a/bn4b2_branch2a/Relu                 Tensor("bn4b2_branch2a/bn4b2_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b2_branch2b/convolution/BatchToSpaceND         Tensor("res4b2_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b2_branch2b/bn4b2_branch2b/Relu                 Tensor("bn4b2_branch2b/bn4b2_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b2_branch2c/Conv2D                             Tensor("res4b2_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b2_branch2c/bn4b2_branch2c/Identity             Tensor("bn4b2_branch2c/bn4b2_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b1_relu                                        Tensor("res4b1_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b2_branch2c/bn4b2_branch2c/Identity             Tensor("bn4b2_branch2c/bn4b2_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b2                                             Tensor("res4b2:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b2_relu                                        Tensor("res4b2_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b3_branch2a/Conv2D                             Tensor("res4b3_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b3_branch2a/bn4b3_branch2a/Relu                 Tensor("bn4b3_branch2a/bn4b3_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b3_branch2b/convolution/BatchToSpaceND         Tensor("res4b3_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b3_branch2b/bn4b3_branch2b/Relu                 Tensor("bn4b3_branch2b/bn4b3_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b3_branch2c/Conv2D                             Tensor("res4b3_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b3_branch2c/bn4b3_branch2c/Identity             Tensor("bn4b3_branch2c/bn4b3_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b2_relu                                        Tensor("res4b2_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b3_branch2c/bn4b3_branch2c/Identity             Tensor("bn4b3_branch2c/bn4b3_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b3                                             Tensor("res4b3:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b3_relu                                        Tensor("res4b3_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b4_branch2a/Conv2D                             Tensor("res4b4_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b4_branch2a/bn4b4_branch2a/Relu                 Tensor("bn4b4_branch2a/bn4b4_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b4_branch2b/convolution/BatchToSpaceND         Tensor("res4b4_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b4_branch2b/bn4b4_branch2b/Relu                 Tensor("bn4b4_branch2b/bn4b4_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b4_branch2c/Conv2D                             Tensor("res4b4_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b4_branch2c/bn4b4_branch2c/Identity             Tensor("bn4b4_branch2c/bn4b4_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b3_relu                                        Tensor("res4b3_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b4_branch2c/bn4b4_branch2c/Identity             Tensor("bn4b4_branch2c/bn4b4_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b4                                             Tensor("res4b4:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b4_relu                                        Tensor("res4b4_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b5_branch2a/Conv2D                             Tensor("res4b5_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b5_branch2a/bn4b5_branch2a/Relu                 Tensor("bn4b5_branch2a/bn4b5_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b5_branch2b/convolution/BatchToSpaceND         Tensor("res4b5_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b5_branch2b/bn4b5_branch2b/Relu                 Tensor("bn4b5_branch2b/bn4b5_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b5_branch2c/Conv2D                             Tensor("res4b5_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b5_branch2c/bn4b5_branch2c/Identity             Tensor("bn4b5_branch2c/bn4b5_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b4_relu                                        Tensor("res4b4_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b5_branch2c/bn4b5_branch2c/Identity             Tensor("bn4b5_branch2c/bn4b5_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b5                                             Tensor("res4b5:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b5_relu                                        Tensor("res4b5_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b6_branch2a/Conv2D                             Tensor("res4b6_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b6_branch2a/bn4b6_branch2a/Relu                 Tensor("bn4b6_branch2a/bn4b6_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b6_branch2b/convolution/BatchToSpaceND         Tensor("res4b6_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b6_branch2b/bn4b6_branch2b/Relu                 Tensor("bn4b6_branch2b/bn4b6_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b6_branch2c/Conv2D                             Tensor("res4b6_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b6_branch2c/bn4b6_branch2c/Identity             Tensor("bn4b6_branch2c/bn4b6_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b5_relu                                        Tensor("res4b5_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b6_branch2c/bn4b6_branch2c/Identity             Tensor("bn4b6_branch2c/bn4b6_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b6                                             Tensor("res4b6:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b6_relu                                        Tensor("res4b6_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b7_branch2a/Conv2D                             Tensor("res4b7_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b7_branch2a/bn4b7_branch2a/Relu                 Tensor("bn4b7_branch2a/bn4b7_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b7_branch2b/convolution/BatchToSpaceND         Tensor("res4b7_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b7_branch2b/bn4b7_branch2b/Relu                 Tensor("bn4b7_branch2b/bn4b7_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b7_branch2c/Conv2D                             Tensor("res4b7_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b7_branch2c/bn4b7_branch2c/Identity             Tensor("bn4b7_branch2c/bn4b7_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b6_relu                                        Tensor("res4b6_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b7_branch2c/bn4b7_branch2c/Identity             Tensor("bn4b7_branch2c/bn4b7_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b7                                             Tensor("res4b7:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b7_relu                                        Tensor("res4b7_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b8_branch2a/Conv2D                             Tensor("res4b8_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b8_branch2a/bn4b8_branch2a/Relu                 Tensor("bn4b8_branch2a/bn4b8_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b8_branch2b/convolution/BatchToSpaceND         Tensor("res4b8_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b8_branch2b/bn4b8_branch2b/Relu                 Tensor("bn4b8_branch2b/bn4b8_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b8_branch2c/Conv2D                             Tensor("res4b8_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b8_branch2c/bn4b8_branch2c/Identity             Tensor("bn4b8_branch2c/bn4b8_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b7_relu                                        Tensor("res4b7_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b8_branch2c/bn4b8_branch2c/Identity             Tensor("bn4b8_branch2c/bn4b8_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b8                                             Tensor("res4b8:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b8_relu                                        Tensor("res4b8_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b9_branch2a/Conv2D                             Tensor("res4b9_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b9_branch2a/bn4b9_branch2a/Relu                 Tensor("bn4b9_branch2a/bn4b9_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b9_branch2b/convolution/BatchToSpaceND         Tensor("res4b9_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b9_branch2b/bn4b9_branch2b/Relu                 Tensor("bn4b9_branch2b/bn4b9_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b9_branch2c/Conv2D                             Tensor("res4b9_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b9_branch2c/bn4b9_branch2c/Identity             Tensor("bn4b9_branch2c/bn4b9_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b8_relu                                        Tensor("res4b8_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b9_branch2c/bn4b9_branch2c/Identity             Tensor("bn4b9_branch2c/bn4b9_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b9                                             Tensor("res4b9:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b9_relu                                        Tensor("res4b9_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b10_branch2a/Conv2D                            Tensor("res4b10_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b10_branch2a/bn4b10_branch2a/Relu               Tensor("bn4b10_branch2a/bn4b10_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b10_branch2b/convolution/BatchToSpaceND        Tensor("res4b10_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b10_branch2b/bn4b10_branch2b/Relu               Tensor("bn4b10_branch2b/bn4b10_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b10_branch2c/Conv2D                            Tensor("res4b10_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b10_branch2c/bn4b10_branch2c/Identity           Tensor("bn4b10_branch2c/bn4b10_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b9_relu                                        Tensor("res4b9_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b10_branch2c/bn4b10_branch2c/Identity           Tensor("bn4b10_branch2c/bn4b10_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b10                                            Tensor("res4b10:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b10_relu                                       Tensor("res4b10_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b11_branch2a/Conv2D                            Tensor("res4b11_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b11_branch2a/bn4b11_branch2a/Relu               Tensor("bn4b11_branch2a/bn4b11_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b11_branch2b/convolution/BatchToSpaceND        Tensor("res4b11_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b11_branch2b/bn4b11_branch2b/Relu               Tensor("bn4b11_branch2b/bn4b11_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b11_branch2c/Conv2D                            Tensor("res4b11_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b11_branch2c/bn4b11_branch2c/Identity           Tensor("bn4b11_branch2c/bn4b11_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b10_relu                                       Tensor("res4b10_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b11_branch2c/bn4b11_branch2c/Identity           Tensor("bn4b11_branch2c/bn4b11_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b11                                            Tensor("res4b11:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b11_relu                                       Tensor("res4b11_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b12_branch2a/Conv2D                            Tensor("res4b12_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b12_branch2a/bn4b12_branch2a/Relu               Tensor("bn4b12_branch2a/bn4b12_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b12_branch2b/convolution/BatchToSpaceND        Tensor("res4b12_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b12_branch2b/bn4b12_branch2b/Relu               Tensor("bn4b12_branch2b/bn4b12_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b12_branch2c/Conv2D                            Tensor("res4b12_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b12_branch2c/bn4b12_branch2c/Identity           Tensor("bn4b12_branch2c/bn4b12_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b11_relu                                       Tensor("res4b11_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b12_branch2c/bn4b12_branch2c/Identity           Tensor("bn4b12_branch2c/bn4b12_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b12                                            Tensor("res4b12:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b12_relu                                       Tensor("res4b12_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b13_branch2a/Conv2D                            Tensor("res4b13_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b13_branch2a/bn4b13_branch2a/Relu               Tensor("bn4b13_branch2a/bn4b13_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b13_branch2b/convolution/BatchToSpaceND        Tensor("res4b13_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b13_branch2b/bn4b13_branch2b/Relu               Tensor("bn4b13_branch2b/bn4b13_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b13_branch2c/Conv2D                            Tensor("res4b13_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b13_branch2c/bn4b13_branch2c/Identity           Tensor("bn4b13_branch2c/bn4b13_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b12_relu                                       Tensor("res4b12_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b13_branch2c/bn4b13_branch2c/Identity           Tensor("bn4b13_branch2c/bn4b13_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b13                                            Tensor("res4b13:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b13_relu                                       Tensor("res4b13_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b14_branch2a/Conv2D                            Tensor("res4b14_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b14_branch2a/bn4b14_branch2a/Relu               Tensor("bn4b14_branch2a/bn4b14_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b14_branch2b/convolution/BatchToSpaceND        Tensor("res4b14_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b14_branch2b/bn4b14_branch2b/Relu               Tensor("bn4b14_branch2b/bn4b14_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b14_branch2c/Conv2D                            Tensor("res4b14_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b14_branch2c/bn4b14_branch2c/Identity           Tensor("bn4b14_branch2c/bn4b14_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b13_relu                                       Tensor("res4b13_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b14_branch2c/bn4b14_branch2c/Identity           Tensor("bn4b14_branch2c/bn4b14_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b14                                            Tensor("res4b14:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b14_relu                                       Tensor("res4b14_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b15_branch2a/Conv2D                            Tensor("res4b15_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b15_branch2a/bn4b15_branch2a/Relu               Tensor("bn4b15_branch2a/bn4b15_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b15_branch2b/convolution/BatchToSpaceND        Tensor("res4b15_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b15_branch2b/bn4b15_branch2b/Relu               Tensor("bn4b15_branch2b/bn4b15_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b15_branch2c/Conv2D                            Tensor("res4b15_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b15_branch2c/bn4b15_branch2c/Identity           Tensor("bn4b15_branch2c/bn4b15_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b14_relu                                       Tensor("res4b14_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b15_branch2c/bn4b15_branch2c/Identity           Tensor("bn4b15_branch2c/bn4b15_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b15                                            Tensor("res4b15:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b15_relu                                       Tensor("res4b15_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b16_branch2a/Conv2D                            Tensor("res4b16_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b16_branch2a/bn4b16_branch2a/Relu               Tensor("bn4b16_branch2a/bn4b16_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b16_branch2b/convolution/BatchToSpaceND        Tensor("res4b16_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b16_branch2b/bn4b16_branch2b/Relu               Tensor("bn4b16_branch2b/bn4b16_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b16_branch2c/Conv2D                            Tensor("res4b16_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b16_branch2c/bn4b16_branch2c/Identity           Tensor("bn4b16_branch2c/bn4b16_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b15_relu                                       Tensor("res4b15_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b16_branch2c/bn4b16_branch2c/Identity           Tensor("bn4b16_branch2c/bn4b16_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b16                                            Tensor("res4b16:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b16_relu                                       Tensor("res4b16_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b17_branch2a/Conv2D                            Tensor("res4b17_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b17_branch2a/bn4b17_branch2a/Relu               Tensor("bn4b17_branch2a/bn4b17_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b17_branch2b/convolution/BatchToSpaceND        Tensor("res4b17_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b17_branch2b/bn4b17_branch2b/Relu               Tensor("bn4b17_branch2b/bn4b17_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b17_branch2c/Conv2D                            Tensor("res4b17_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b17_branch2c/bn4b17_branch2c/Identity           Tensor("bn4b17_branch2c/bn4b17_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b16_relu                                       Tensor("res4b16_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b17_branch2c/bn4b17_branch2c/Identity           Tensor("bn4b17_branch2c/bn4b17_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b17                                            Tensor("res4b17:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b17_relu                                       Tensor("res4b17_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b18_branch2a/Conv2D                            Tensor("res4b18_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b18_branch2a/bn4b18_branch2a/Relu               Tensor("bn4b18_branch2a/bn4b18_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b18_branch2b/convolution/BatchToSpaceND        Tensor("res4b18_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b18_branch2b/bn4b18_branch2b/Relu               Tensor("bn4b18_branch2b/bn4b18_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b18_branch2c/Conv2D                            Tensor("res4b18_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b18_branch2c/bn4b18_branch2c/Identity           Tensor("bn4b18_branch2c/bn4b18_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b17_relu                                       Tensor("res4b17_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b18_branch2c/bn4b18_branch2c/Identity           Tensor("bn4b18_branch2c/bn4b18_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b18                                            Tensor("res4b18:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b18_relu                                       Tensor("res4b18_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b19_branch2a/Conv2D                            Tensor("res4b19_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b19_branch2a/bn4b19_branch2a/Relu               Tensor("bn4b19_branch2a/bn4b19_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b19_branch2b/convolution/BatchToSpaceND        Tensor("res4b19_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b19_branch2b/bn4b19_branch2b/Relu               Tensor("bn4b19_branch2b/bn4b19_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b19_branch2c/Conv2D                            Tensor("res4b19_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b19_branch2c/bn4b19_branch2c/Identity           Tensor("bn4b19_branch2c/bn4b19_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b18_relu                                       Tensor("res4b18_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b19_branch2c/bn4b19_branch2c/Identity           Tensor("bn4b19_branch2c/bn4b19_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b19                                            Tensor("res4b19:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b19_relu                                       Tensor("res4b19_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b20_branch2a/Conv2D                            Tensor("res4b20_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b20_branch2a/bn4b20_branch2a/Relu               Tensor("bn4b20_branch2a/bn4b20_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b20_branch2b/convolution/BatchToSpaceND        Tensor("res4b20_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b20_branch2b/bn4b20_branch2b/Relu               Tensor("bn4b20_branch2b/bn4b20_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b20_branch2c/Conv2D                            Tensor("res4b20_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b20_branch2c/bn4b20_branch2c/Identity           Tensor("bn4b20_branch2c/bn4b20_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b19_relu                                       Tensor("res4b19_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b20_branch2c/bn4b20_branch2c/Identity           Tensor("bn4b20_branch2c/bn4b20_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b20                                            Tensor("res4b20:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b20_relu                                       Tensor("res4b20_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b21_branch2a/Conv2D                            Tensor("res4b21_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b21_branch2a/bn4b21_branch2a/Relu               Tensor("bn4b21_branch2a/bn4b21_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b21_branch2b/convolution/BatchToSpaceND        Tensor("res4b21_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b21_branch2b/bn4b21_branch2b/Relu               Tensor("bn4b21_branch2b/bn4b21_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b21_branch2c/Conv2D                            Tensor("res4b21_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b21_branch2c/bn4b21_branch2c/Identity           Tensor("bn4b21_branch2c/bn4b21_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b20_relu                                       Tensor("res4b20_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b21_branch2c/bn4b21_branch2c/Identity           Tensor("bn4b21_branch2c/bn4b21_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b21                                            Tensor("res4b21:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b21_relu                                       Tensor("res4b21_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b22_branch2a/Conv2D                            Tensor("res4b22_branch2a/Conv2D:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b22_branch2a/bn4b22_branch2a/Relu               Tensor("bn4b22_branch2a/bn4b22_branch2a/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b22_branch2b/convolution/BatchToSpaceND        Tensor("res4b22_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 256), dtype=float32)
bn4b22_branch2b/bn4b22_branch2b/Relu               Tensor("bn4b22_branch2b/bn4b22_branch2b/Relu:0", shape=(1, 28, 28, 256), dtype=float32)
res4b22_branch2c/Conv2D                            Tensor("res4b22_branch2c/Conv2D:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b22_branch2c/bn4b22_branch2c/Identity           Tensor("bn4b22_branch2c/bn4b22_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b21_relu                                       Tensor("res4b21_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
bn4b22_branch2c/bn4b22_branch2c/Identity           Tensor("bn4b22_branch2c/bn4b22_branch2c/Identity:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b22                                            Tensor("res4b22:0", shape=(1, 28, 28, 1024), dtype=float32)
res4b22_relu                                       Tensor("res4b22_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res5a_branch1/Conv2D                               Tensor("res5a_branch1/Conv2D:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5a_branch1/bn5a_branch1/Identity                 Tensor("bn5a_branch1/bn5a_branch1/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res4b22_relu                                       Tensor("res4b22_relu:0", shape=(1, 28, 28, 1024), dtype=float32)
res5a_branch2a/Conv2D                              Tensor("res5a_branch2a/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn5a_branch2a/bn5a_branch2a/Relu                   Tensor("bn5a_branch2a/bn5a_branch2a/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5a_branch2b/convolution/BatchToSpaceND          Tensor("res5a_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 512), dtype=float32)
bn5a_branch2b/bn5a_branch2b/Relu                   Tensor("bn5a_branch2b/bn5a_branch2b/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5a_branch2c/Conv2D                              Tensor("res5a_branch2c/Conv2D:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5a_branch2c/bn5a_branch2c/Identity               Tensor("bn5a_branch2c/bn5a_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5a_branch1/bn5a_branch1/Identity                 Tensor("bn5a_branch1/bn5a_branch1/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5a_branch2c/bn5a_branch2c/Identity               Tensor("bn5a_branch2c/bn5a_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res5a                                              Tensor("res5a:0", shape=(1, 28, 28, 2048), dtype=float32)
res5a_relu                                         Tensor("res5a_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
res5b_branch2a/Conv2D                              Tensor("res5b_branch2a/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn5b_branch2a/bn5b_branch2a/Relu                   Tensor("bn5b_branch2a/bn5b_branch2a/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5b_branch2b/convolution/BatchToSpaceND          Tensor("res5b_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 512), dtype=float32)
bn5b_branch2b/bn5b_branch2b/Relu                   Tensor("bn5b_branch2b/bn5b_branch2b/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5b_branch2c/Conv2D                              Tensor("res5b_branch2c/Conv2D:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5b_branch2c/bn5b_branch2c/Identity               Tensor("bn5b_branch2c/bn5b_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res5a_relu                                         Tensor("res5a_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5b_branch2c/bn5b_branch2c/Identity               Tensor("bn5b_branch2c/bn5b_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res5b                                              Tensor("res5b:0", shape=(1, 28, 28, 2048), dtype=float32)
res5b_relu                                         Tensor("res5b_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
res5c_branch2a/Conv2D                              Tensor("res5c_branch2a/Conv2D:0", shape=(1, 28, 28, 512), dtype=float32)
bn5c_branch2a/bn5c_branch2a/Relu                   Tensor("bn5c_branch2a/bn5c_branch2a/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5c_branch2b/convolution/BatchToSpaceND          Tensor("res5c_branch2b/convolution/BatchToSpaceND:0", shape=(1, 28, 28, 512), dtype=float32)
bn5c_branch2b/bn5c_branch2b/Relu                   Tensor("bn5c_branch2b/bn5c_branch2b/Relu:0", shape=(1, 28, 28, 512), dtype=float32)
res5c_branch2c/Conv2D                              Tensor("res5c_branch2c/Conv2D:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5c_branch2c/bn5c_branch2c/Identity               Tensor("bn5c_branch2c/bn5c_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res5b_relu                                         Tensor("res5b_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
bn5c_branch2c/bn5c_branch2c/Identity               Tensor("bn5c_branch2c/bn5c_branch2c/Identity:0", shape=(1, 28, 28, 2048), dtype=float32)
res5c                                              Tensor("res5c:0", shape=(1, 28, 28, 2048), dtype=float32)
res5c_relu                                         Tensor("res5c_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
fc1_voc12_c0/BiasAdd                               Tensor("fc1_voc12_c0/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
res5c_relu                                         Tensor("res5c_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
fc1_voc12_c1/BiasAdd                               Tensor("fc1_voc12_c1/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
res5c_relu                                         Tensor("res5c_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
fc1_voc12_c2/BiasAdd                               Tensor("fc1_voc12_c2/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
res5c_relu                                         Tensor("res5c_relu:0", shape=(1, 28, 28, 2048), dtype=float32)
fc1_voc12_c3/BiasAdd                               Tensor("fc1_voc12_c3/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
fc1_voc12_c0/BiasAdd                               Tensor("fc1_voc12_c0/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
fc1_voc12_c1/BiasAdd                               Tensor("fc1_voc12_c1/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
fc1_voc12_c2/BiasAdd                               Tensor("fc1_voc12_c2/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
fc1_voc12_c3/BiasAdd                               Tensor("fc1_voc12_c3/BiasAdd:0", shape=(1, 28, 28, 21), dtype=float32)
fc1_voc12                                          Tensor("fc1_voc12:0", shape=(1, 28, 28, 21), dtype=float32)

2. Training from random values, or using pre-trained weights

you can download the already converted models - deeplab_resnet.ckpt (pre-trained) and deeplab_resnet_init.ckpt (the last layers are randomly initialised) - here.

DeepLabV2_VGG16

code from http://liangchiehchen.com/projects/DeepLabv2_vgg.html

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]
KEYPOINT

DrSleep/tensorflow-deeplab-lfov#18

  1. similar to DeepLab-LargeFOV
  2. no avg_pool5
  3. ASPP on fc6 with 4 different atrous holes and sum them up at fc8
ARCHITECTURE (based on VGG16)
# The DeepLabV2-VGG16 model can be represented as follows:
# [default] kernel_size = 3 for all layers.
imageinput -> conv1: [conv-relu](dilation=1, channels=64)  x 2 -> [max_pool](stride=2)
           -> conv2: [conv-relu](dilation=1, channels=128) x 2 -> [max_pool](stride=2)
           -> conv3: [conv-relu](dilation=1, channels=256) x 3 -> [max_pool](stride=2)
           -> conv4: [conv-relu](dilation=1, channels=512) x 3 -> [max_pool](stride=1)
           -> conv5: [conv-relu](dilation=2, channels=512) x 3 -> [max_pool](stride=1)
           -> ASPP:
              (a) -> fc6: [conv-relu](dilation=6,  channels=1024)                -> [dropout]
                  -> fc7: [conv-relu](dilation=1,  channels=1024, kernel_size=1) -> [dropout]
                  -> fc8: [conv-relu](dilation=1,  channels=21,   kernel_size=1)
              (b) -> fc6: [conv-relu](dilation=12, channels=1024)                -> [dropout]
                  -> fc7: [conv-relu](dilation=1,  channels=1024, kernel_size=1) -> [dropout]
                  -> fc8: [conv-relu](dilation=1,  channels=21,   kernel_size=1)
              (c) -> fc6: [conv-relu](dilation=18, channels=1024)                -> [dropout]
                  -> fc7: [conv-relu](dilation=1,  channels=1024, kernel_size=1) -> [dropout]
                  -> fc8: [conv-relu](dilation=1,  channels=21,   kernel_size=1)
              (d) -> fc6: [conv-relu](dilation=24, channels=1024)                -> [dropout]
                  -> fc7: [conv-relu](dilation=1,  channels=1024, kernel_size=1) -> [dropout]
                  -> fc8: [conv-relu](dilation=1,  channels=21,   kernel_size=1)
           -> output: [sum](fc8_a + fc8_b + fc8_c + fc8_d)     -> [pixel-wise softmax loss].

DeepLabV3_Res101

code from https://github.com/GeorgeSeif/Semantic-Segmentation-Suite/blob/master/models/DeepLabV3.py

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]

1. Import Resnet-101

resnet_v2_101/conv1                                 Tensor("resnet_v2_101/conv1/BiasAdd:0", shape=(1, 112, 112, 64), dtype=float32)
pool2                                               Tensor("resnet_v2_101/pool1/MaxPool:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_1/bottleneck_v2/shortcut  Tensor("resnet_v2_101/block1/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_101/block1/unit_1/bottleneck_v2/conv1     Tensor("resnet_v2_101/block1/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_1/bottleneck_v2/conv2     Tensor("resnet_v2_101/block1/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_1/bottleneck_v2/conv3     Tensor("resnet_v2_101/block1/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_101/block1/unit_1/bottleneck_v2           Tensor("resnet_v2_101/block1/unit_1/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_101/block1/unit_2/bottleneck_v2/conv1     Tensor("resnet_v2_101/block1/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_2/bottleneck_v2/conv2     Tensor("resnet_v2_101/block1/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_2/bottleneck_v2/conv3     Tensor("resnet_v2_101/block1/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_101/block1/unit_2/bottleneck_v2           Tensor("resnet_v2_101/block1/unit_2/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_101/block1/unit_3/bottleneck_v2/conv1     Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_101/block1/unit_3/bottleneck_v2/conv2     Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 64), dtype=float32)
resnet_v2_101/block1/unit_3/bottleneck_v2/conv3     Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_101/block1/unit_3/bottleneck_v2           Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_101/block1                                Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_101/block2/unit_1/bottleneck_v2/shortcut  Tensor("resnet_v2_101/block2/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_1/bottleneck_v2/conv1     Tensor("resnet_v2_101/block2/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_1/bottleneck_v2/conv2     Tensor("resnet_v2_101/block2/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_1/bottleneck_v2/conv3     Tensor("resnet_v2_101/block2/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_1/bottleneck_v2           Tensor("resnet_v2_101/block2/unit_1/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_2/bottleneck_v2/conv1     Tensor("resnet_v2_101/block2/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_2/bottleneck_v2/conv2     Tensor("resnet_v2_101/block2/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_2/bottleneck_v2/conv3     Tensor("resnet_v2_101/block2/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_2/bottleneck_v2           Tensor("resnet_v2_101/block2/unit_2/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_3/bottleneck_v2/conv1     Tensor("resnet_v2_101/block2/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_3/bottleneck_v2/conv2     Tensor("resnet_v2_101/block2/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_3/bottleneck_v2/conv3     Tensor("resnet_v2_101/block2/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_3/bottleneck_v2           Tensor("resnet_v2_101/block2/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_101/block2/unit_4/bottleneck_v2/conv1     Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_101/block2/unit_4/bottleneck_v2/conv2     Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 128), dtype=float32)
resnet_v2_101/block2/unit_4/bottleneck_v2/conv3     Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_101/block2/unit_4/bottleneck_v2           Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_101/block2                                Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_101/block3/unit_1/bottleneck_v2/shortcut  Tensor("resnet_v2_101/block3/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_1/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_1/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_1/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_1/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_1/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_2/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_2/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_2/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_2/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_2/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_3/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_3/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_3/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_3/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_3/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_4/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_4/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_4/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_4/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_5/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_5/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_5/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_5/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_5/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_5/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_5/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_5/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_6/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_6/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_6/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_6/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_6/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_6/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_6/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_6/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_7/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_7/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_7/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_7/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_7/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_7/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_7/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_7/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_8/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_8/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_8/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_8/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_8/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_8/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_8/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_8/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_9/bottleneck_v2/conv1     Tensor("resnet_v2_101/block3/unit_9/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_9/bottleneck_v2/conv2     Tensor("resnet_v2_101/block3/unit_9/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_9/bottleneck_v2/conv3     Tensor("resnet_v2_101/block3/unit_9/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_9/bottleneck_v2           Tensor("resnet_v2_101/block3/unit_9/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_10/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_10/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_10/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_10/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_10/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_10/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_10/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_10/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_11/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_11/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_11/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_11/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_11/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_11/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_11/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_11/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_12/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_12/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_12/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_12/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_12/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_12/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_12/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_12/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_13/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_13/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_13/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_13/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_13/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_13/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_13/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_13/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_14/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_14/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_14/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_14/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_14/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_14/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_14/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_14/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_15/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_15/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_15/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_15/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_15/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_15/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_15/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_15/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_16/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_16/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_16/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_16/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_16/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_16/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_16/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_16/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_17/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_17/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_17/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_17/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_17/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_17/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_17/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_17/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_18/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_18/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_18/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_18/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_18/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_18/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_18/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_18/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_19/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_19/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_19/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_19/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_19/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_19/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_19/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_19/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_20/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_20/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_20/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_20/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_20/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_20/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_20/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_20/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_21/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_21/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_21/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_21/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_21/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_21/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_21/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_21/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_22/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_22/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_22/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_22/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_22/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_22/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_22/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_22/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_101/block3/unit_23/bottleneck_v2/conv1    Tensor("resnet_v2_101/block3/unit_23/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_101/block3/unit_23/bottleneck_v2/conv2    Tensor("resnet_v2_101/block3/unit_23/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 256), dtype=float32)
resnet_v2_101/block3/unit_23/bottleneck_v2/conv3    Tensor("resnet_v2_101/block3/unit_23/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_101/block3/unit_23/bottleneck_v2          Tensor("resnet_v2_101/block3/unit_23/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_101/block3                                Tensor("resnet_v2_101/block3/unit_23/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_101/block4/unit_1/bottleneck_v2/shortcut  Tensor("resnet_v2_101/block4/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_1/bottleneck_v2/conv1     Tensor("resnet_v2_101/block4/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_1/bottleneck_v2/conv2     Tensor("resnet_v2_101/block4/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_1/bottleneck_v2/conv3     Tensor("resnet_v2_101/block4/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_1/bottleneck_v2           Tensor("resnet_v2_101/block4/unit_1/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_2/bottleneck_v2/conv1     Tensor("resnet_v2_101/block4/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_2/bottleneck_v2/conv2     Tensor("resnet_v2_101/block4/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_2/bottleneck_v2/conv3     Tensor("resnet_v2_101/block4/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_2/bottleneck_v2           Tensor("resnet_v2_101/block4/unit_2/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_3/bottleneck_v2/conv1     Tensor("resnet_v2_101/block4/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_3/bottleneck_v2/conv2     Tensor("resnet_v2_101/block4/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_101/block4/unit_3/bottleneck_v2/conv3     Tensor("resnet_v2_101/block4/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4/unit_3/bottleneck_v2           Tensor("resnet_v2_101/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_101/block4                                Tensor("resnet_v2_101/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
pool3                                               Tensor("resnet_v2_101/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
pool4                                               Tensor("resnet_v2_101/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
pool5                                               Tensor("resnet_v2_101/postnorm/Relu:0", shape=(1, 7, 7, 2048), dtype=float32)

2. Extract pool4 features (ASPP)

net = AtrousSpatialPyramidPoolingModule('pool4')                                    # <tf.Tensor 'conv_1x1_output/BiasAdd:0' shape=(1, 14, 14, 256) dtype=float32>
net = Upsampling(net, label_size)                                                   # <tf.Tensor 'ResizeBilinear_1:0' shape=(1, ?, ?, 256) dtype=float32>
net = slim.conv2d(net, num_classes, [1, 1], activation_fn=None, scope='logits')     # <tf.Tensor 'logits/BiasAdd:0' shape=(1, ?, ?, 21) dtype=float32>

return net

DeepLabV3_Res50

code from https://github.com/GeorgeSeif/Semantic-Segmentation-Suite/blob/master/models/DeepLabV3.py

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]

1. Import Resnet-50

resnet_v2_50/conv1                                  Tensor("resnet_v2_50/conv1/BiasAdd:0", shape=(1, 112, 112, 64), dtype=float32)
pool2                                               Tensor("resnet_v2_50/pool1/MaxPool:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 64), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block1                                 Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 128), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block2                                 Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 256), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block3                                 Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4                                 Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
pool3                                               Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
pool4                                               Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
pool5                                               Tensor("resnet_v2_50/postnorm/Relu:0", shape=(1, 7, 7, 2048), dtype=float32)

2. Extract pool4 features (ASPP)

net = AtrousSpatialPyramidPoolingModule('pool4')                                    # <tf.Tensor 'conv_1x1_output/BiasAdd:0' shape=(1, 14, 14, 256) dtype=float32>
net = Upsampling(net, label_size)                                                   # <tf.Tensor 'ResizeBilinear_1:0' shape=(1, ?, ?, 256) dtype=float32>
net = slim.conv2d(net, num_classes, [1, 1], activation_fn=None, scope='logits')     # <tf.Tensor 'logits/BiasAdd:0' shape=(1, ?, ?, 21) dtype=float32>

return net

DeepLabV3+_Res50

code from https://github.com/GeorgeSeif/Semantic-Segmentation-Suite/blob/master/models/DeepLabV3_plus.py

  • input: inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
  • num_classes: num_classes = 21
  • label_size: label_size = tf.shape(inputs)[1:3]

1. Import Resnet-50

resnet_v2_50/conv1                                  Tensor("resnet_v2_50/conv1/BiasAdd:0", shape=(1, 112, 112, 64), dtype=float32)
pool2                                               Tensor("resnet_v2_50/pool1/MaxPool:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_1/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_2/bottleneck_v2/add:0", shape=(1, 56, 56, 256), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 56, 56, 64), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 64), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block1/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block1                                 Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_1/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_2/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 512), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv1      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 28, 28, 128), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv2      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 128), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2/conv3      Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block2/unit_4/bottleneck_v2            Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block2                                 Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_1/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_2/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_3/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_4/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv2/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_5/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_5/bottleneck_v2/add:0", shape=(1, 14, 14, 1024), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv1      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv1/Relu:0", shape=(1, 14, 14, 256), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv2      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 256), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2/conv3      Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block3/unit_6/bottleneck_v2            Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block3                                 Tensor("resnet_v2_50/block3/unit_6/bottleneck_v2/add:0", shape=(1, 7, 7, 1024), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/shortcut   Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/shortcut/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_1/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_1/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_2/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_2/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv1      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv1/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv2      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/Relu:0", shape=(1, 7, 7, 512), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2/conv3      Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/conv3/BiasAdd:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4/unit_3/bottleneck_v2            Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
resnet_v2_50/block4                                 Tensor("resnet_v2_50/block4/unit_3/bottleneck_v2/add:0", shape=(1, 7, 7, 2048), dtype=float32)
pool3                                               Tensor("resnet_v2_50/block1/unit_3/bottleneck_v2/add:0", shape=(1, 28, 28, 256), dtype=float32)
pool4                                               Tensor("resnet_v2_50/block2/unit_4/bottleneck_v2/add:0", shape=(1, 14, 14, 512), dtype=float32)
pool5                                               Tensor("resnet_v2_50/postnorm/Relu:0", shape=(1, 7, 7, 2048), dtype=float32)

2. Extract pool2 features

encoder_features = 'pool2'

3. Extract pool4 features (ASPP)

net = AtrousSpatialPyramidPoolingModule('pool4')                                    # <tf.Tensor 'concat:0' shape=(1, 14, 14, 1280) dtype=float32>
net = slim.conv2d(net, 256, [1, 1], scope="conv_1x1_output", activation_fn=None)    # <tf.Tensor 'conv_1x1_output/BiasAdd:0' shape=(1, 14, 14, 256) dtype=float32>
decoder_features = Upsampling(net, label_size / 4)                                  # <tf.Tensor 'ResizeBilinear_1:0' shape=(1, ?, ?, 256) dtype=float32>

4. Concatenate features

encoder_features = slim.conv2d(encoder_features, 48, [1, 1], activation_fn=tf.nn.relu, normalizer_fn=None)
# encoder_features: <tf.Tensor 'Conv_5/Relu:0' shape=(1, 56, 56, 48) dtype=float32>

net = tf.concat((encoder_features, decoder_features), axis=3)
net = slim.conv2d(net, 256, [3, 3], activation_fn=tf.nn.relu, normalizer_fn=None)
net = slim.conv2d(net, 256, [3, 3], activation_fn=tf.nn.relu, normalizer_fn=None)

net = Upsampling(net, label_size)

net = slim.conv2d(net, num_classes, [1, 1], activation_fn=None, scope='logits')

return net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment