May 2020
Beginner to intermediate
430 pages
10h 39m
English
If you look at the image provided at the beginning of the Coding an hourglass model section, you will notice that the left and right blocks are connected by the connect_left_to_right block. The code that's used to connect the left block to the right block is as follows:
def connect_left_to_right(left, right, bottleneck, name, num_channels):''':param left: connect left feature to right feature:param name: layer name:return:'''_xleft = bottleneck(left, num_channels, name + '_connect')_xright = UpSampling2D()(right)add = Add()([_xleft, _xright])out = bottleneck(add, num_channels, name + '_connect_conv')return out
Note that each right block is generated by upsampling and is added to the left block to generate the final output. ...