code: def __init__(
      self,
      in_features,
      out_features,
      begin_nodes=7,
      end_nodes=2,
      bias=False,
      adj=None,
  ):
      super(Graph_trans, self).__init__()
      self.in_features = in_features
      self.out_features = out_features
      self.weight = Parameter(
          torch.FloatTensor(in_features, out_features)
      )
      if adj is not None:
          h, w = adj.size()
          assert (h == end_nodes) and (w == begin_nodes)
          self.adj = torch.autograd.Variable(adj, requires_grad=False)
      else:
          self.adj = Parameter(
              torch.FloatTensor(end_nodes, begin_nodes)
          )
      if bias:
          self.bias = Parameter(torch.FloatTensor(out_features))
      else:
          self.register_parameter("bias", None)
  
imports: import torch
  from .None import graph
  import torch.nn
  import torch.nn.functional
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 1 to create a new Graph_trans object from inherited base classes: nn with example: obj = Graph_trans(in_features, out_features, begin_nodes, end_nodes, bias, adj)