HALF data type with GPU backend

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

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.