class_docstr: Implementation of Spatio-Temporal Graph Convolutional Networks
docstr: Spatio convolution layer
docstr_tok: ["Spatio","convolution","layer"]
code: def spatio_conv_layer(self, x, Ks, c_in, c_out, name):
      """Spatio convolution layer"""
      _, T, n, _ = x.shape
      if c_in > c_out:
          x_input = fl.conv2d(
              input=x,
              num_filters=c_out,
              filter_size=[1, 1],
              stride=[1, 1],
              padding="SAME",
              data_format="NHWC",
              param_attr=fluid.ParamAttr(name="%s_conv2d_1" % name),
          )
      elif c_in < c_out:
          # if the size of input channel is less than the output,
          # padding x to the same size of output channel.
          pad = fl.fill_constant_batch_size_like(
              input=x,
              shape=[-1, T, n, c_out - c_in],
              dtype="float32",
              value=0.0,
          )
          x_input = fl.concat([x, pad], axis=3)
      else:
          x_input = x
  
      for i in range(Ks):
          # x_input shape: [B,T, num_nodes, c_out]
          x_input = fl.reshape(x_input, [-1, c_out])
  
          x_input = self.message_passing(
              self.gw,
              x_input,
              name="%s_mp_%d" % (name, i),
              norm=self.gw.node_feat["norm"],
          )
  
          x_input = fl.fc(
              x_input,
              size=c_out,
              bias_attr=False,
              param_attr=fluid.ParamAttr(
                  name="%s_gcn_fc_%d" % (name, i)
              ),
          )
  
          bias = fluid.layers.create_parameter(
              shape=[c_out],
              dtype="float32",
              is_bias=True,
              name="%s_gcn_bias_%d" % (name, i),
          )
          x_input = fluid.layers.elementwise_add(
              x_input, bias, act="relu"
          )
  
          x_input = fl.reshape(x_input, [-1, T, n, c_out])
  
      return x_input
  
file_path: PGL/legacy/examples/stgcn/models/model.py
imports: import numpy
  import paddle.fluid
  import paddle.fluid.layers
  import pgl
label_desc: Use image node_id 5 for calling the STGCNModel obj's underlying member method code with example usage: obj.spatio_conv_layer(x, Ks, c_in, c_out, name) and returns: x_input