Exemplo n.º 1
0
 def backend_attrs_v2(self):
     return [
         spatial_getter('stride-x', 'stride', 1),
         spatial_getter('stride-y', 'stride', 0),
         ('kernel-x', lambda node: node.kernel_spatial[1]),
         ('kernel-y', lambda node: node.kernel_spatial[0]),
         spatial_getter('dilation-x', 'dilation', 0),
         spatial_getter('dilation-y', 'dilation', 1),
         spatial_getter('pad-x', 'pad', 1, lambda x: x[0]),
         spatial_getter('pad-y', 'pad', 0, lambda x: x[0]),
         spatial_getter('pad-r', 'pad', 1, lambda x: x[1]),
         spatial_getter('pad-b', 'pad', 0, lambda x: x[1]),
         'auto_pad',
         'output',
         'group',
     ]
Exemplo n.º 2
0
 def backend_attrs_v2(self):
     return [
         ('stride', lambda node: attr_getter(node, 'stride')),
         spatial_getter('stride-x', 'stride', 1),
         spatial_getter('stride-y', 'stride', 0),
         spatial_getter('kernel-x', 'window', 1),
         spatial_getter('kernel-y', 'window', 0),
         spatial_getter('pad-x', 'pad', 1, lambda x: x[0]),
         spatial_getter('pad-y', 'pad', 0, lambda x: x[0]),
         ('pool-method', 'pool_method'),
         ('exclude-pad', 'exclude_pad'),
         'rounding_type',
         'auto_pad',
     ]