# How to perform mixed-precision training?

**URL:** <https://community.konduit.ai/t/how-to-perform-mixed-precision-training/3335>\
**Category:** DL4J\
**Created:** [February 24, 2025, 2:57am UTC](https://community.konduit.ai/t/how-to-perform-mixed-precision-training/3335 "2025-02-24T02:57:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cqiaoYc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/cqiaoyc/32/738_2.png) [@cqiaoYc](https://community.konduit.ai/u/cqiaoYc)\
**Post date:** [February 24, 2025, 2:57am UTC](https://community.konduit.ai/t/how-to-perform-mixed-precision-training/3335/1 "2025-02-24T02:57:28Z")

</div>

May I ask where I can find an example of mixed precision training? I converted the feature array and label array to half precision, and set the data type to half precision in the network configuration, but it fails to compute the gradients correctly. When I set the data type to FLOAT, it prompts a precision mismatch exception.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [February 24, 2025, 3:36am UTC](https://community.konduit.ai/t/how-to-perform-mixed-precision-training/3335/2 "2025-02-24T03:36:16Z")

</div>

@cqiaoYc unfortunately support for that will only be in my mid term rewrite that’s being worked of the internals.  
That will be in the next release. That might be possible in cudnn somehow but I haven’t explored much on that.
