docstr: Architecture in Table 4 of FlowNet 2.0.
  
  Args:
      x: NCHW tensor, where C=11 is the concatenation of 7 items of [3, 2, 2, 1, 1, 1, 1] channels.
docstr_tok: ["Architecture","in","Table","4","of","FlowNet","2.0",".","Args",":","x",":","NCHW","tensor",",","where","C=11","is","the","concatenation","of","7","items","of","[","3",",","2",",","2",",","1",",","1",",","1",",","1","]","channels","."]
code: def flownet2_fusion(self, x):
      """
      Architecture in Table 4 of FlowNet 2.0.
  
      Args:
          x: NCHW tensor, where C=11 is the concatenation of 7 items of [3, 2, 2, 1, 1, 1, 1] channels.
      """
      with argscope(
          [tf.layers.conv2d],
          activation=lambda x: tf.nn.leaky_relu(x, 0.1),
          padding="valid",
          strides=2,
          kernel_size=3,
          data_format="channels_first",
      ), argscope(
          [tf.layers.conv2d_transpose],
          padding="same",
          activation=tf.identity,
          data_format="channels_first",
          strides=2,
          kernel_size=4,
      ):
          conv0 = tf.layers.conv2d(
              pad(x, 1), 64, name="conv0", strides=1
          )
  
          x = tf.layers.conv2d(pad(conv0, 1), 64, name="conv1")
          conv1 = tf.layers.conv2d(
              pad(x, 1), 128, name="conv1_1", strides=1
          )
          x = tf.layers.conv2d(pad(conv1, 1), 128, name="conv2")
          conv2 = tf.layers.conv2d(
              pad(x, 1), 128, name="conv2_1", strides=1
          )
  
          flow2 = tf.layers.conv2d(
              pad(conv2, 1),
              2,
              name="predict_flow2",
              strides=1,
              activation=tf.identity,
          )
          flow2_up = tf.layers.conv2d_transpose(
              flow2, 2, name="upsampled_flow2_to_1"
          )
          x = tf.layers.conv2d_transpose(
              conv2,
              32,
              name="deconv1",
              activation=lambda x: tf.nn.leaky_relu(x, 0.1),
          )
  
          concat1 = tf.concat(
              [conv1, x, flow2_up], axis=1, name="concat1"
          )
          interconv1 = tf.layers.conv2d(
              pad(concat1, 1),
              32,
              strides=1,
              name="inter_conv1",
              activation=tf.identity,
          )
  
          flow1 = tf.layers.conv2d(
              pad(interconv1, 1),
              2,
              name="predict_flow1",
              strides=1,
              activation=tf.identity,
          )
          flow1_up = tf.layers.conv2d_transpose(
              flow1, 2, name="upsampled_flow1_to_0"
          )
          x = tf.layers.conv2d_transpose(
              concat1,
              16,
              name="deconv0",
              activation=lambda x: tf.nn.leaky_relu(x, 0.1),
          )
  
          concat0 = tf.concat(
              [conv0, x, flow1_up], axis=1, name="concat0"
          )
          interconv0 = tf.layers.conv2d(
              pad(concat0, 1),
              16,
              strides=1,
              name="inter_conv0",
              activation=tf.identity,
          )
          flow0 = tf.layers.conv2d(
              pad(interconv0, 1),
              2,
              name="predict_flow0",
              strides=1,
              activation=tf.identity,
          )
  
          return tf.identity(flow0, name="flow2")
  
imports: import tensorflow
  from tensorpack import ModelDesc, argscope, enable_argscope_for_module
label_desc: Use image node_id 3 for calling the FlowNet2 obj's underlying member method code with example usage: obj.flownet2_fusion(x) and returns: tf