nabu.misc.utils module¶
- class nabu.misc.utils.ConvolutionInfos[source]¶
Bases:
object
- allowed_axes = {'1D': [None], '2D': [None], '3D': [None], 'batched_1D_2D': [(0,), (1,)], 'batched_1D_3D': [(0,), (1,), (2,)], 'batched_2D_3D': [(0,), (1,), (2,)], 'batched_separable_2D_1D_3D': [(0,), (1,), (2,)], 'separable_2D_1D_2D': [None, (0, 1), (1, 0)], 'separable_3D_1D_3D': [None, (0, 1, 2), (1, 2, 0), (2, 0, 1), (2, 1, 0), (1, 0, 2), (0, 2, 1)], 'separable_3D_2D_3D': [(1, 0), (0, 1), (2, 0), (0, 2), (1, 2), (2, 1)]}¶
- use_cases = {(1, 1): {'1D': {'kernels': ['convol_1D_X'], 'name': '1D convolution on 1D data'}}, (2, 1): {'batched_1D_2D': {'kernels': ['convol_1D_X', 'convol_1D_Y'], 'name': 'Batched 1D convolution on 2D data'}, 'separable_2D_1D_2D': {'kernels': ['convol_1D_X', 'convol_1D_Y'], 'name': 'Separable (2D->1D) convolution on 2D data'}}, (2, 2): {'2D': {'kernels': ['convol_2D_XY'], 'name': '2D convolution on 2D data'}}, (3, 1): {'batched_1D_3D': {'kernels': ['convol_1D_X', 'convol_1D_Y', 'convol_1D_Z'], 'name': 'Batched 1D convolution on 3D data'}, 'batched_separable_2D_1D_3D': {'kernels': ['convol_1D_X', 'convol_1D_Y', 'convol_1D_Z'], 'name': 'Batched separable (2D->1D) convolution on 3D data'}, 'separable_3D_1D_3D': {'kernels': ['convol_1D_X', 'convol_1D_Y', 'convol_1D_Z'], 'name': 'Separable (3D->1D) convolution on 3D data'}}, (3, 2): {'batched_2D_3D': {'kernels': ['convol_2D_XY', 'convol_2D_XZ', 'convol_2D_YZ'], 'name': 'Batched 2D convolution on 3D data'}, 'separable_3D_2D_3D': {'kernels': ['convol_2D_XY', 'convol_2D_XZ', 'convol_2D_YZ'], 'name': 'Separable (3D->2D) convolution on 3D data'}}, (3, 3): {'3D': {'kernels': ['convol_3D_XYZ'], 'name': '3D convolution on 3D data'}}}¶