:nosearch: .. _op_ai_onnx_Dropout-12: Dropout - version 12 ==================== This page documents version **12** of operator **Dropout**. See :doc:`Dropout` for the latest version (since version 22). - **Domain**: ``ai.onnx`` - **Since version**: 12 **Inputs** - **data** (*T*): The input data as Tensor. - **ratio** (*T1*): The ratio of random dropout, with value in [0, 1). If this input was not set, or if it was 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(double), tensor(float), tensor(float16). - **T1**: Constrain input 'ratio' types to float tensors. Allowed types: tensor(double), tensor(float), tensor(float16). - **T2**: Constrain output 'mask' types to boolean tensors. Allowed types: tensor(bool). Differences with previous version (10) -------------------------------------- **SchemaDiff**: ``Dropout`` (domain ``'ai.onnx'``) * old version: 10 * new version: 12 * breaking: **yes** **Breaking reasons:** * input 'ratio' (added): at position 1; option=Single; type_str='T1' * input 'training_mode' (added): at position 2; option=Single; type_str='T2' * output 'mask' (changed): type_str changed 'T1' -> 'T2' * type constraint 'T1' (changed): added types: ['tensor(double)', 'tensor(float)', 'tensor(float16)']; removed types: ['tensor(bool)'] **Inputs:** * [BREAKING] added 'ratio': at position 1; option=Single; type_str='T1' * [BREAKING] added 'training_mode': at position 2; option=Single; type_str='T2' **Outputs:** * [BREAKING] changed 'mask': type_str changed 'T1' -> 'T2' **Type constraints:** * added 'T2': added types: ['tensor(bool)'] * [BREAKING] changed 'T1': added types: ['tensor(double)', 'tensor(float)', 'tensor(float16)']; removed types: ['tensor(bool)']