In the current version of TF (2.2.0) there is an option to do multi class classification (i.e., more than two classes, by changing n_classes to the relevant number in the estimator params). However, all previous examples that I saw, for example the formal one here: https://www.tensorflow.org/tutorials/estimator/boosted_trees_model_understanding present binary classification. So I'm not sure what to do with the target (classes) vector. If I keep him in the range of [0,...,num_classes-1], when I try to train the model, I get the error (comes from TF gradients.py file): "'int' object has no attribute 'is_compatible_with'". It feels like a dimension\shape error with respect to class vector, but I couldn't find the default loss function and what the this model expects to get. I don't think I need to convert the class vector to binary matrix (one hot encoding). Appreciate any help!
Asked
Active
Viewed 337 times
1 Answers
1
Indeed when I've changed the TF code manually everything worked. Then, I found out there is a bug report on the issue here: https://github.com/tensorflow/tensorflow/issues/40063

Ron_ad
- 73
- 6