def xception_internal(inputs, hparams):
  """Xception body."""
  with tf.variable_scope("xception"):
    cur = inputs

    if cur.get_shape().as_list()[1] > 200:
      # Large image, Xception entry flow
      cur = xception_entry(cur, hparams.hidden_size)
    else:
      # Small image, conv
      cur = common_layers.conv_block(
          cur,
          hparams.hidden_size, [((1, 1), (3, 3))],
          first_relu=False,
          padding="SAME",
          force2d=True,
          name="small_image_conv")

    for i in range(hparams.num_hidden_layers):
      with tf.variable_scope("layer_%d" % i):
        cur = residual_block(cur, hparams)

    return xception_exit(cur)
def xception_internal ( inputs , hparams ) : with tf . variable_scope ( "xception" ) : cur = inputs if cur . get_shape ( ) . as_list ( ) [ 1 ] > 200 : cur = xception_entry ( cur , hparams . hidden_size ) else : cur = common_layers . conv_block ( cur , hparams . hidden_size , [ ( ( 1 , 1 ) , ( 3 , 3 ) ) ] , first_relu = False , padding = "SAME" , force2d = True , name = "small_image_conv" ) for i in range ( hparams . num_hidden_layers ) : with tf . variable_scope ( "layer_%d" % i ) : cur = residual_block ( cur , hparams ) return xception_exit ( cur )
Xception body.