class_docstr: The Set Abstraction Multi-Scale grouping Layer
class_docstr_tok: ["The","Set","Abstraction","Multi-Scale","grouping","Layer"]
code: def forward(self, pos, feat):
      centroids = farthest_point_sampler(pos, self.npoints)
      feat_res_list = []
  
      for i in range(self.group_size):
          g = self.frnn_graph_list[i](pos, centroids, feat)
          g.update_all(self.message_list[i], self.conv_list[i])
          mask = g.ndata["center"] == 1
          pos_dim = g.ndata["pos"].shape[-1]
          feat_dim = g.ndata["new_feat"].shape[-1]
          if i == 0:
              pos_res = g.ndata["pos"][mask].view(
                  self.batch_size, -1, pos_dim
              )
          feat_res = g.ndata["new_feat"][mask].view(
              self.batch_size, -1, feat_dim
          )
          feat_res_list.append(feat_res)
  
      feat_res = torch.cat(feat_res_list, 2)
      return pos_res, feat_res
  
imports: import dgl
  import dgl.function
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.geometry import farthest_point_sampler
  from torch.autograd import Variable
label_desc: Use image node_id 2 for calling the SAMSGModule obj's underlying member method code with example usage: obj.forward(pos, feat) and returns: pos_res,  feat_res