parameters: (self, x, h_out, n_out, stride=None, is_training=True, scope="bottleneck")
docstring: A residual bottleneck unit
docstring_summary: A residual bottleneck unit
docstring_tokens: A residual bottleneck unit
function: def _bottleneck(self, x, h_out, n_out, stride=None, is_training=True, scope="bottleneck"):
          """ A residual bottleneck unit"""
          n_in = x.get_shape()[-1]#输入通道
          if stride is None:
              stride = 1 if n_in == n_out else 2# 步长大小
  
          with tf.variable_scope(scope):
              # 经过两个3×3卷积(= 1*1  + 3*3  + 1*1)形成 f(x) 后与 x相加  
              # 第一个卷积(2d卷积 + 批规范化 + relu激活) 1*1的卷积核
              h = conv2d(x, h_out, 1, stride=stride, scope="conv_1")
              h = batch_norm(h, is_training=is_training, scope="bn_1")
              h = tf.nn.relu(h)
              #  第二个卷积(2d卷积 + 批规范化 + relu激活) 3*3的卷积核
              h = conv2d(h, h_out, 3, stride=1, scope="conv_2")
              h = batch_norm(h, is_training=is_training, scope="bn_2")
              h = tf.nn.relu(h)
              #  第三个卷积 1*1
              h = conv2d(h, n_out, 1, stride=1, scope="conv_3")
              h = batch_norm(h, is_training=is_training, scope="bn_3")
  
              if n_in != n_out:# 当 x和 f(x)通道不一致时 对x再次进行卷积 输出和f(x)一致的通道数
                  shortcut = conv2d(x, n_out, 1, stride=stride, scope="conv_4")
                  shortcut = batch_norm(shortcut, is_training=is_training, scope="bn_4")
              else:
                  shortcut = x
              return tf.nn.relu(shortcut + h)
function_tokens: def _bottleneck ( self , x , h_out , n_out , stride = None , is_training = True , scope = "bottleneck" ) : n_in = x . get_shape ( ) [ - 1 ] #输入通道 if stride is None : stride = 1 if n_in == n_out else 2 # 步长大小 with tf . variable_scope ( scope ) : # 经过两个3×3卷积(= 1*1  + 3*3  + 1*1)形成 f(x) 后与 x相加   # 第一个卷积(2d卷积 + 批规范化 + relu激活) 1*1的卷积核 h = conv2d ( x , h_out , 1 , stride = stride , scope = "conv_1" ) h = batch_norm ( h , is_training = is_training , scope = "bn_1" ) h = tf . nn . relu ( h ) #  第二个卷积(2d卷积 + 批规范化 + relu激活) 3*3的卷积核 h = conv2d ( h , h_out , 3 , stride = 1 , scope = "conv_2" ) h = batch_norm ( h , is_training = is_training , scope = "bn_2" ) h = tf . nn . relu ( h ) #  第三个卷积 1*1 h = conv2d ( h , n_out , 1 , stride = 1 , scope = "conv_3" ) h = batch_norm ( h , is_training = is_training , scope = "bn_3" ) if n_in != n_out : # 当 x和 f(x)通道不一致时 对x再次进行卷积 输出和f(x)一致的通道数 shortcut = conv2d ( x , n_out , 1 , stride = stride , scope = "conv_4" ) shortcut = batch_norm ( shortcut , is_training = is_training , scope = "bn_4" ) else : shortcut = x return tf . nn . relu ( shortcut + h )