from pytorch_tabnet.tab_model import TabNetClassifier
model = TabNetClassifier()
model.fit(X_train, y_train, eval_set=[(X_valid, y_valid)])
print(sum(p.numel() for p in model.parameters() if p.requires_grad))
>>> XXX # The number of trainable parameters in the model
What is motivation or use case for adding/changing the behavior?
Knowing the number of trainable parameters that the model has.
How should this be implemented in your opinion?
Implementing an attribute parameters for TabNetClassifier and TabNetRegressor objects.
Feature request
What is the expected behavior?
What is motivation or use case for adding/changing the behavior?
Knowing the number of trainable parameters that the model has.
How should this be implemented in your opinion?
Implementing an attribute
parameters
for TabNetClassifier and TabNetRegressor objects.Are you willing to work on this yourself?
Yes.