Closed mainguyenanhvu closed 3 years ago
The currently supported types are currently hard-coded as FlexibleCategoricalIntTypes = [tf.int32, tf.int64]
.
See https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/tensorflow/core.py#L105
The missing types (int8 and int16) will be added in the next release. In the mean time, you will have to apply a cast operation :)
The fix was published in TF-DF 0.2.0.
I converted a dataframe with dtype int8 into tf.dataset by using tfdf.keras.pd_dataframe_to_tf_dataset. Then, I feed it into tensorflow_decision_forests.RandomForestModel and it returns error:
If I use a dataframe with dtype int32, it runs well.
Please help me explain it.