class_docstr: Computing image spatial gradients.
code: def __init__(
      self, spatial_axis=0, do_cropping=True, name="spatial_gradient"
  ):
      Layer.__init__(self, name=name)
      self.spatial_axis = int(spatial_axis)
      self.do_cropping = do_cropping
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.base_layer import Layer
  from niftynet.layer.layer_util import infer_spatial_rank
label_desc: Use image node_id 1 to create a new SpatialGradientLayer object from inherited base classes: Layer with example: obj = SpatialGradientLayer(spatial_axis, do_cropping, name)