.. _op_ai_onnx_Dropout: Dropout ======= - **Domain**: ``ai.onnx`` - **Since version**: 22 **Inputs** - **data** (*T*): The input data as Tensor. - **ratio** (*T1*): The ratio of random dropout, with value in [0, 1). If set to 0, the output would be a simple copy of the input. If it's non-zero, output will be a random dropout of the scaled input, which is typically the case during training. It is an optional value, if not specified it will default to 0.5. - **training_mode** (*T2*): If set to true then it indicates dropout is being used for training. It is an optional value hence unless specified explicitly, it is false. If it is false, ratio is ignored and the operation mimics inference mode where nothing will be dropped from the input data and if mask is requested as output it will contain all ones. **Outputs** - **output** (*T*): The output. - **mask** (*T2*): The output mask. **Type Constraints** - **T**: Constrain input and output types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz). - **T1**: Constrain input 'ratio' types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz). - **T2**: Constrain output 'mask' types to boolean tensors. Allowed types: tensor(bool). Examples -------- **test_cc_dropout_default_inference** .. code-block:: text Node: Dropout(data) -> (output) .. code-block:: text Inputs: data: shape=(2, 3), dtype=float32 [[ 1., -2., 3.], [-4., 5., -6.]] Outputs: output: shape=(2, 3), dtype=float32 [[ 1., -2., 3.], [-4., 5., -6.]] **test_cc_dropout_training_mask** .. code-block:: text Node: Dropout(data, ratio, training_mode) -> (output, mask) Attributes: seed = 123 .. code-block:: text Inputs: data: shape=(2, 3), dtype=float32 [[ 1., -2., 3.], [-4., 5., -6.]] ratio: shape=(), dtype=float32 0. training_mode: shape=(), dtype=bool True Outputs: output: shape=(2, 3), dtype=float32 [[ 1., -2., 3.], [-4., 5., -6.]] mask: shape=(2, 3), dtype=bool [[ True, True, True], [ True, True, True]] **test_dropout_default_mask** .. code-block:: text Node: Dropout(x) -> (y, z) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] z: shape=(3, 4, 5), dtype=bool [[[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]]] **test_dropout_default_mask_ratio** .. code-block:: text Node: Dropout(x, r) -> (y, z) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.1 Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] z: shape=(3, 4, 5), dtype=bool [[[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]]] **test_dropout_default_ratio** .. code-block:: text Node: Dropout(x, r) -> (y) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.1 Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] **test_training_dropout** .. code-block:: text Node: Dropout(x, r, t) -> (y) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.75 t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 0. , 0. , 0. , -6.767636 , 0. ], [ 0.9738197 , 0. , -4.417655 , 0. , 0. ], [ 0. , 0. , 0. , 0. , -1.1009502 ], [ 0. , -2.7885423 , 0. , 0. , 0. ]], [[ 2.14507 , -4.702566 , 0. , 0. , 0. ], [ 0. , -4.9666886 , -0.12313622, 0. , 0. ], [ 0. , 0. , 0. , 0. , -0.4486666 ], [ 0.68982244, 1.0911211 , 0. , -2.976365 , 0.6161755 ]], [[ 1.50704 , 0. , -5.0662656 , -0.5394136 , 0. ], [ 0. , -1.7815502 , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , -1.387601 ], [-0.32237974, 0. , 0. , 0. , 0. ]]] **test_training_dropout_default** .. code-block:: text Node: Dropout(x, r, t) -> (y) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.5 t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 0.09292694, 2.7658916 , 0.2742976 , -3.383818 , 1.2014202 ], [ 0.48690984, 1.3582331 , -2.2088275 , 0. , 0.63774025], [ 0.85880065, 0. , 0. , 0. , -0.5504751 ], [ 0. , -1.3942711 , 0. , 0. , 0. ]], [[ 1.072535 , -2.351283 , -1.8945199 , 0. , -1.2518436 ], [ 0. , -2.4833443 , -0.06156811, 0. , 0. ], [ 0. , 1.6676576 , 0. , 0. , -0.2243333 ], [ 0.34491122, 0.54556054, 0. , -1.4881825 , 0.30808774]], [[ 0.75352 , 0. , -2.5331328 , -0.2697068 , 0. ], [-2.0516043 , -0.8907751 , -2.504625 , 0. , 0.2996058 ], [-0.06528632, -0.61348975, 0. , 4.04292 , -0.6938005 ], [-0.16118987, 0.34827727, 0. , 0. , 0. ]]] **test_training_dropout_default_mask** .. code-block:: text Node: Dropout(x, r, t) -> (y, z) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.5 t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 0.09292694, 2.7658916 , 0.2742976 , -3.383818 , 1.2014202 ], [ 0.48690984, 1.3582331 , -2.2088275 , 0. , 0.63774025], [ 0.85880065, 0. , 0. , 0. , -0.5504751 ], [ 0. , -1.3942711 , 0. , 0. , 0. ]], [[ 1.072535 , -2.351283 , -1.8945199 , 0. , -1.2518436 ], [ 0. , -2.4833443 , -0.06156811, 0. , 0. ], [ 0. , 1.6676576 , 0. , 0. , -0.2243333 ], [ 0.34491122, 0.54556054, 0. , -1.4881825 , 0.30808774]], [[ 0.75352 , 0. , -2.5331328 , -0.2697068 , 0. ], [-2.0516043 , -0.8907751 , -2.504625 , 0. , 0.2996058 ], [-0.06528632, -0.61348975, 0. , 4.04292 , -0.6938005 ], [-0.16118987, 0.34827727, 0. , 0. , 0. ]]] z: shape=(3, 4, 5), dtype=bool [[[ True, True, True, True, True], [ True, True, True, False, True], [ True, False, False, False, True], [False, True, False, False, False]], [[ True, True, True, False, True], [False, True, True, False, False], [False, True, False, False, True], [ True, True, False, True, True]], [[ True, False, True, True, False], [ True, True, True, False, True], [ True, True, False, True, True], [ True, True, False, False, False]]] **test_training_dropout_mask** .. code-block:: text Node: Dropout(x, r, t) -> (y, z) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0.75 t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 0. , 0. , 0. , -6.767636 , 0. ], [ 0.9738197 , 0. , -4.417655 , 0. , 0. ], [ 0. , 0. , 0. , 0. , -1.1009502 ], [ 0. , -2.7885423 , 0. , 0. , 0. ]], [[ 2.14507 , -4.702566 , 0. , 0. , 0. ], [ 0. , -4.9666886 , -0.12313622, 0. , 0. ], [ 0. , 0. , 0. , 0. , -0.4486666 ], [ 0.68982244, 1.0911211 , 0. , -2.976365 , 0.6161755 ]], [[ 1.50704 , 0. , -5.0662656 , -0.5394136 , 0. ], [ 0. , -1.7815502 , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , -1.387601 ], [-0.32237974, 0. , 0. , 0. , 0. ]]] z: shape=(3, 4, 5), dtype=bool [[[False, False, False, True, False], [ True, False, True, False, False], [False, False, False, False, True], [False, True, False, False, False]], [[ True, True, False, False, False], [False, True, True, False, False], [False, False, False, False, True], [ True, True, False, True, True]], [[ True, False, True, True, False], [False, True, False, False, False], [False, False, False, False, True], [ True, False, False, False, False]]] **test_training_dropout_zero_ratio** .. code-block:: text Node: Dropout(x, r, t) -> (y) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0. t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] **test_training_dropout_zero_ratio_mask** .. code-block:: text Node: Dropout(x, r, t) -> (y, z) Attributes: seed = 0 .. code-block:: text Inputs: x: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] r: shape=(), dtype=float32 0. t: shape=(), dtype=bool True Outputs: y: shape=(3, 4, 5), dtype=float32 [[[ 4.6463471e-02, 1.3829458e+00, 1.3714880e-01, -1.6919090e+00, 6.0071009e-01], [ 2.4345492e-01, 6.7911655e-01, -1.1044137e+00, 4.5067111e-01, 3.1887013e-01], [ 4.2940032e-01, -3.2931709e-01, -7.0354521e-01, 1.5400329e+00, -2.7523756e-01], [-1.0286078e+00, -6.9713557e-01, 1.5095510e+00, 2.8403193e-01, 1.7900924e-01]], [[ 5.3626752e-01, -1.1756415e+00, -9.4725996e-01, -1.5665634e-01, -6.2592179e-01], [-5.7998300e-01, -1.2416722e+00, -3.0784056e-02, -1.2716962e+00, 3.0988488e-01], [-7.7895904e-01, 8.3382881e-01, -2.2362176e-01, -7.6644284e-01, -1.1216665e-01], [ 1.7245561e-01, 2.7278027e-01, -5.9851777e-04, -7.4409127e-01, 1.5404387e-01]], [[ 3.7676001e-01, -1.5235322e+00, -1.2665664e+00, -1.3485339e-01, -5.4190117e-01], [-1.0258021e+00, -4.4538754e-01, -1.2523125e+00, -1.6568837e-01, 1.4980289e-01], [-3.2643158e-02, -3.0674487e-01, -3.5604239e-01, 2.0214601e+00, -3.4690025e-01], [-8.0594935e-02, 1.7413864e-01, -1.6281415e+00, -2.8330054e-02, -1.3410546e+00]]] z: shape=(3, 4, 5), dtype=bool [[[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]], [[ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True], [ True, True, True, True, True]]] Differences with previous version (13) -------------------------------------- **SchemaDiff**: ``Dropout`` (domain ``'ai.onnx'``) * old version: 13 * new version: 22 * breaking: no **Type constraints:** * changed 'T': added types: ['tensor(float8e4m3fn)', 'tensor(float8e4m3fnuz)', 'tensor(float8e5m2)', 'tensor(float8e5m2fnuz)'] * changed 'T1': added types: ['tensor(bfloat16)', 'tensor(float8e4m3fn)', 'tensor(float8e4m3fnuz)', 'tensor(float8e5m2)', 'tensor(float8e5m2fnuz)'] Version History --------------- - :doc:`Version 13 ` - :doc:`Version 12 ` - :doc:`Version 10 ` - :doc:`Version 7 ` - :doc:`Version 6 ` - :doc:`Version 1 `