parameters: (fn)
return_statement: return (axis, np.array(params.get('stride', 1), ndmin=1),
              (ks - 1) * dilation + 1,
              np.array(params.get('pad', 0), ndmin=1))
docstring: Extract the spatial parameters that determine the coordinate mapping:
      kernel size, stride, padding, and dilation.
  
      Implementation detail: Convolution, Deconvolution, and Im2col layers
      define these in the convolution_param message, while Pooling has its
      own fields in pooling_param. This method deals with these details to
      extract canonical parameters.
docstring_summary: Extract the spatial parameters that determine the coordinate mapping:
      kernel size, stride, padding, and dilation.
docstring_tokens: Extract the spatial parameters that determine the coordinate mapping : kernel size stride padding and dilation .
function: def conv_params(fn):
      """
      Extract the spatial parameters that determine the coordinate mapping:
      kernel size, stride, padding, and dilation.
  
      Implementation detail: Convolution, Deconvolution, and Im2col layers
      define these in the convolution_param message, while Pooling has its
      own fields in pooling_param. This method deals with these details to
      extract canonical parameters.
      """
      params = fn.params.get('convolution_param', fn.params)
      axis = params.get('axis', 1)
      ks = np.array(params['kernel_size'], ndmin=1)
      dilation = np.array(params.get('dilation', 1), ndmin=1)
      assert len({'pad_h', 'pad_w', 'kernel_h', 'kernel_w', 'stride_h',
                  'stride_w'} & set(fn.params)) == 0, \
          'cropping does not support legacy _h/_w params'
      return (axis, np.array(params.get('stride', 1), ndmin=1),
              (ks - 1) * dilation + 1,
              np.array(params.get('pad', 0), ndmin=1))
function_tokens: def conv_params ( fn ) : params = fn . params . get ( 'convolution_param' , fn . params ) axis = params . get ( 'axis' , 1 ) ks = np . array ( params [ 'kernel_size' ] , ndmin = 1 ) dilation = np . array ( params . get ( 'dilation' , 1 ) , ndmin = 1 ) assert len ( { 'pad_h' , 'pad_w' , 'kernel_h' , 'kernel_w' , 'stride_h' , 'stride_w' } & set ( fn . params ) ) == 0 , 'cropping does not support legacy _h/_w params' return ( axis , np . array ( params . get ( 'stride' , 1 ) , ndmin = 1 ) , ( ks - 1 ) * dilation + 1 , np . array ( params . get ( 'pad' , 0 ) , ndmin = 1 ) )