class_docstr: The :class:`SpatialTransformer2dAffine` class is a 2D `Spatial Transformer Layer <https://arxiv.org/abs/1506.02025>`__ for
  `2D Affine Transformation <https://en.wikipedia.org/wiki/Affine_transformation>`__.
  
  Parameters
  -----------
  out_size : tuple of int or None
      - The size of the output of the network (height, width), the feature maps will be resized by this.
  in_channels : int
      The number of in channels.
  data_format : str
      "channel_last" (NHWC, default) or "channels_first" (NCHW).
  name : str
      - A unique layer name.
  
  References
  -----------
  - `Spatial Transformer Networks <https://arxiv.org/abs/1506.02025>`__
  - `TensorFlow/Models <https://github.com/tensorflow/models/tree/master/transformer>`__
class_docstr_tok: ["The",":","class",":","`","SpatialTransformer2dAffine","`","class","is","a","2D","`","Spatial","Transformer","Layer","<","https",":","\/\/arxiv.org\/abs\/1506.02025",">","`","__","for","`","2D","Affine","Transformation","<","https",":","\/\/en.wikipedia.org\/wiki\/Affine_transformation",">","`","__",".","Parameters","--","--","--","--","--","-","out_size",":","tuple","of","int","or","None","-","The","size","of","the","output","of","the","network","(","height",",","width",")",",","the","feature","maps","will","be","resized","by","this",".","in_channels",":","int","The","number","of","in","channels",".","data_format",":","str","``","channel_last","''","(","NHWC",",","default",")","or","``","channels_first","''","(","NCHW",")",".","name",":","str","-","A","unique","layer","name",".","References","--","--","--","--","--","-","-","`","Spatial","Transformer","Networks","<","https",":","\/\/arxiv.org\/abs\/1506.02025",">","`","__","-","`","TensorFlow\/Models","<","https",":","\/\/github.com\/tensorflow\/models\/tree\/master\/transformer",">","`","__"]
code: def __repr__(self):
      s = "{classname}(out_size={out_size}, "
      if self.in_channels is not None:
          s += "in_channels='{in_channels}'"
      if self.name is not None:
          s += ", name='{name}'"
      s += ")"
      return s.format(
          classname=self.__class__.__name__, **self.__dict__
      )
  
file_path: TensorLayer/tensorlayer/layers/spatial_transformer.py
imports: import numpy
  import tensorflow
  from six.moves import xrange
  from tensorflow.python.ops import array_ops
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
  from tensorlayer.layers.utils import flatten_reshape
label_desc: Use image node_id 2 for calling the SpatialTransformer2dAffine obj's underlying member method code with example usage: obj.__repr__() and returns: s