class_docstr: STN which learns a k-dimensional linear transformation
  
  Arguments:
      nn (torch.nn.Module) -- module which takes feat_x as input and regresses it to a global feature used to calculate the transform
      nn_feat_size -- the size of the global feature
      k -- the size of trans_x
      batch_size -- the number of examples per batch
code: def __init__(self, nn, nn_feat_size, k=3, batch_size=1):
      super().__init__()
  
      self.nn = nn
      self.k = k
      self.batch_size = batch_size
  
      # fully connected layer to regress the global feature to a k-d linear transform
      # the transform is initialized to the identity
      self.fc_layer = Linear(nn_feat_size, k * k)
      torch.nn.init.constant_(self.fc_layer.weight, 0)
      torch.nn.init.constant_(self.fc_layer.bias, 0)
      self.identity = torch.eye(k).view(1, k * k).repeat(batch_size, 1)
  
imports: import torch
  from torch.nn import Linear
label_desc: Use image node_id 1 to create a new BaseLinearTransformSTNkD object from inherited base classes: torch.nn with example: obj = BaseLinearTransformSTNkD(nn, nn_feat_size, k, batch_size)