# tensorplay.custom_bwd Source: https://www.tensorplay.cn/docs/generated/tensorplay.custom_bwd.html ```python tensorplay.custom_bwd(bwd=None, *, device_type: str) ``` Create a helper decorator for backward methods of custom autograd functions. Autograd functions are subclasses of tensorplay.autograd.Function. Ensures that backward executes with the same autocast state as forward. Parameters: device_type ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – Device type to use. ‘cuda’, ‘cpu’. The type is the same as the type attribute of a [tensorplay.device](/docs/generated/tensorplay.Device.html#tensorplay.Device). Thus, you may obtain the device type of a tensor using Tensor.device.type.