class_docstr: test for:
      add, sub, mul, div, exp, matmul,
      relu, gelu, tanh, silu, sigmod, softmax, leaky_relu,
      size, unsqueeze, flatten, cat, slice, reshape, transpose, t, select, permute, constant_pad_nd, split
      mean, avg_pool2d, max_pool2d, sum, adaptive_avg_pool2d,
      to, Int, view,
      type_as, expand_as, contiguous,
  
  notes:
      'floor_divide' have no backward, then not be tested
class_docstr_tok: ["test","for",":","add",",","sub",",","mul",",","div",",","exp",",","matmul",",","relu",",","gelu",",","tanh",",","silu",",","sigmod",",","softmax",",","leaky_relu",",","size",",","unsqueeze",",","flatten",",","cat",",","slice",",","reshape",",","transpose",",","t",",","select",",","permute",",","constant_pad_nd",",","split","mean",",","avg_pool2d",",","max_pool2d",",","sum",",","adaptive_avg_pool2d",",","to",",","Int",",","view",",","type_as",",","expand_as",",","contiguous",",","notes",":","'floor_divide","'","have","no","backward",",","then","not","be","tested"]
code: def forward(self, x: torch.Tensor):
      y1 = torch.ones_like(x)
      y2 = torch.rand_like(x)
      y3 = torch.randn_like(x)
      y4 = torch.zeros_like(x)
      # x -= y1
      # x += y2 + y3 + y4
      x = x.sub(y1)
      x = x.add(y2)
      x = x.add(y3)
      x = x.add(y4)
  
      x = x.contiguous(memory_format=torch.channels_last)
      x = torch._C._nn.upsample_bilinear2d(x, (28, 28), False)
      x = torch._C._nn.upsample_nearest2d(x, (28, 28))
      x = F.adaptive_avg_pool2d(x, (28, 28))
  
      x = torch.exp(x)
      x = torch.sigmoid(x)
  
      x = torch.transpose(x, 1, 2)
      x = torch.transpose(x, 1, 2)
  
      x = F.avg_pool2d(x, 3, 1, padding=1)
      x = F.max_pool2d(x, 3, 1, padding=1)
  
      x = x.to(torch.float32)
  
      x = self.conv1(x)
      # y1 = self.pool1(F.relu(x))
      # y2 = self.pool2(F.gelu(x))
      # y3 = self.pool3(F.leaky_relu(x))
      y1 = F.relu(x)
      y2 = F.gelu(x)
      y3 = F.leaky_relu(x)
      y1 = self.pool1(y1)
      y2 = self.pool2(y2)
      y3 = self.pool3(y3)
  
      x = y1 + y2 + y3
  
      x = x + 0.00001
  
      x = x * 1.00001
  
      x = self.conv2(x)
      # y1 = self.pool4(F.silu(x))
      # y2 = self.pool5(torch.tanh(x))
      y1 = F.silu(x)
      y2 = torch.tanh(x)
      y1 = self.pool4(y1)
      y2 = self.pool5(y2)
  
      x = y1 - y2
  
      x = x - 0.00001
  
      x = x / 1.00001
  
      x = torch.permute(x, (0, 2, 3, 1))
      x = torch.permute(x, (0, 2, 3, 1))
      x = torch.permute(x, (0, 2, 3, 1))
      x = torch.unsqueeze(x, dim=1)
      x = torch.select(x, dim=1, index=0)
      x = torch.unsqueeze(x, dim=1)
      x = torch.mean(x, dim=1)
      x = torch.unsqueeze(x, dim=1)
      x = torch.sum(x, dim=1, dtype=torch.float32)
      x = torch.unsqueeze(x, dim=1)
      x = torch.squeeze(x, dim=1)
      x = torch.flatten(x, 1)
      x = x.reshape(x.shape)
      x = x.view(-1, x.size(1))
  
      x = self.logsoftmax(self.fc1(x))
      x = F.log_softmax(self.fc2(x))
      x = F.softmax(self.fc3(x), dim=1)
  
      y1 = x[:, 0 : int(x.size(1) / 2)]
      y2 = x[:, int(x.size(1) / 2) : x.size(1)]
      x = torch.cat((y1, y2), dim=1)
  
      x = x.type_as(x)
      x = x.expand_as(x)
      x = torch.matmul(x, x.t())
      # x = torch.split(x, 1, dim=1)
      # x = torch.cat(x, dim=1)
      # x = self.cond(x) # condition is not support now
      # x = self.asub(x)
      x = torch.constant_pad_nd(x, (1, 1, 1, 1), 3.14159)
  
      return x
  
imports: import unittest
  import torch
  import torch.nn.functional
  from nni.compression.pruning import L1NormPruner
  from nni.compression.speedup import ModelSpeedup
  from nni.compression.utils import compute_sparsity_compact2origin, compute_sparsity_mask2compact
label_desc: Use image node_id 2 for calling the TorchModel1 obj's underlying member method code with example usage: obj.forward(x) and returns: x