class_docstr: Global Perception Block
  
  Args:
      - input_channels (`int`):
          Number of input channels & final output channels.
      - internal_neurons (`int`):
          Number of channels used to connect conv2d layers inside block.
  
  Example:
      >>> import torch
      >>> from towhee.models.repmlp import GlobalPerceptron
      >>>
      >>> data = torch.rand(3, 1, 1)
      >>> layer = GlobalPerceptron(input_channels=3, internal_neurons=4)
      >>> out = layer(data)
      >>> print(out.shape)
      torch.Size([1, 3, 1, 1])
class_docstr_tok: ["Global","Perception","Block","Args",":","-","input_channels","(","`","int","`",")",":","Number","of","input","channels","&","final","output","channels",".","-","internal_neurons","(","`","int","`",")",":","Number","of","channels","used","to","connect","conv2d","layers","inside","block",".","Example",":",">",">",">","import","torch",">",">",">","from","towhee.models.repmlp","import","GlobalPerceptron",">",">",">",">",">",">","data","=","torch.rand","(","3",",","1",",","1",")",">",">",">","layer","=","GlobalPerceptron","(","input_channels=3",",","internal_neurons=4",")",">",">",">","out","=","layer","(","data",")",">",">",">","print","(","out.shape",")","torch.Size","(","[","1",",","3",",","1",",","1","]",")"]
code: def forward(self, inputs):
      x = nn.functional.adaptive_avg_pool2d(inputs, output_size=(1, 1))
      x = self.fc1(x)
      x = nn.functional.relu(x, inplace=True)
      x = self.fc2(x)
      x = torch.sigmoid(x)
      x = x.view(-1, self.input_channels, 1, 1)
      return x
  
file_path: towhee/towhee/models/repmlp/blocks.py
imports: import torch
  from torch import nn
  from towhee.models.layers.conv_bn_activation import Conv2dBNActivation
  from towhee.models.utils.fuse_bn import fuse_bn
label_desc: Use image node_id 2 for calling the GlobalPerceptron obj's underlying member method code with example usage: obj.forward(inputs) and returns: x