# HALF data type with GPU backend

**URL:** <https://community.konduit.ai/t/half-data-type-with-gpu-backend/205>\
**Category:** DL4J\
**Created:** [March 3, 2020, 10:31am UTC](https://community.konduit.ai/t/half-data-type-with-gpu-backend/205 "2020-03-03T10:31:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rolnire](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/rolnire/32/103_2.png) [@Rolnire](https://community.konduit.ai/u/Rolnire)\
**Post date:** [March 3, 2020, 10:31am UTC](https://community.konduit.ai/t/half-data-type-with-gpu-backend/205/1 "2020-03-03T10:31:28Z")

</div>

Hello guys,

I have question about using half data type. What is proper way, how to force Dl4J to use half data type?

Should I only set Nd4j.setDefaultDataTypes(DataType.HALF, DataType.HALF) on first line? If I am using pretrained model, should i convert it with convertDataType()?

My expectation was that there will be smaller memory consumption and maybe “faster” training, but I am getting some exceptions. So my first question is, am I doing it right?

Thank you

---

<div class="post-metadata">

**Author:** ![raver119](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@raver119](https://community.konduit.ai/u/raver119)\
**Post date:** [March 3, 2020, 11:31am UTC](https://community.konduit.ai/t/half-data-type-with-gpu-backend/205/2 "2020-03-03T11:31:20Z")

</div>

Yep, it’s just a type of INDArray. These days we support almost all possible types, so you don’t have to force anything.

But at dl4j level - yes, you’ll have to convert the model if it is already initialized/trained as, say, single precision model.
