Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use tabnet model to train models with both categorical features and continuous features? #33

Open
MrPolong opened this issue Sep 15, 2022 · 1 comment

Comments

@MrPolong
Copy link

I want to use my data to train tabnetclassfier models. The data is a hybrid data, including categorical features and continuous features. I find 'train_embedding.py' and 'train_iris.py' in /examples, which are use their own data types. I handle continuous data use tf.feature_column.numeric_column(col_name), and handle categorical data use tf.feature_column.indicator_column(tf.feature_column.categorical_column_with_vocabulary_list(col_name,[1,2,10,20,30])), Then I put them in feature_columns as a parameter of TabNetClassifier(). The console will raise the error of unequal size, such as

ValueError: Dimensions must be equal, but are 89 and 458 for '{{node tab_net_classifier_2/tab_net_2/Mul_10}} = Mul[T=DT_FLOAT](tab_net_classifier_2/tab_net_2/PartitionedCall, tab_net_classifier_2/tab_net_2/input_gn/Reshape_3)' with input shapes: [?,89], [?,458]

So, how do I train the model with two kinds of data as input.

@tchangaghis
Copy link

hello @MrPolong did you find a solution? i am looking also for something like that. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants