{"id":24473,"library":"pytorch-tabnet","title":"PyTorch TabNet","description":"PyTorch implementation of TabNet (Google's attention-based tabular network). Current version 4.1.0, with semi-annual releases. Supports classification, regression, and unsupervised pre-training.","status":"active","version":"4.1.0","language":"python","source_language":"en","source_url":"https://github.com/dreamquark-ai/tabnet","tags":["tabular","deep-learning","pytorch","tabnet","classification","regression"],"install":[{"cmd":"pip install pytorch-tabnet","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"wrong":"from pytorch_tabnet.tab_model import TabNetClassifier","symbol":"TabNetClassifier","correct":"from pytorch_tabnet import TabNetClassifier"}],"quickstart":{"code":"from pytorch_tabnet.tab_model import TabNetClassifier\nimport numpy as np\n\nX_train = np.random.rand(100, 10)\ny_train = np.random.randint(0, 2, 100)\n\nclf = TabNetClassifier(device_name='cpu')\nclf.fit(X_train, y_train, max_epochs=10)\nprint(clf.predict(X_train))","lang":"python","description":"Minimal example of fitting a TabNetClassifier on random data."},"warnings":[{"fix":"Retrain any models that used unsupervised pretraining after upgrading to v4.x.","message":"In v4.0, the unsupervised pretraining loss was changed to match the original paper. Models trained with pretraining in v3.x cannot be directly resumed or fine-tuned in v4.x without retraining.","severity":"breaking","affected_versions":"v4.0+"},{"fix":"Explicitly set the `eval_metric` parameter to 'mse' to retain old behavior.","message":"The default metric for regression changed from 'mse' to 'rmse' in v3.0.0. If you relied on default metric behavior, your training/evaluation results may differ.","severity":"breaking","affected_versions":"v3.0.0+"},{"fix":"Ensure `len(cat_idxs) == len(cat_dims)` and that each index corresponds to a valid column.","message":"When using categorical features, `cat_idxs` and `cat_dims` must be consistent. An error is raised only in v4.0+ if they are incoherent.","severity":"gotcha","affected_versions":">=4.0"},{"fix":"Use clf.save_model('model.pt') and clf.load_model('model.pt').","message":"Saving and loading models: use `save_model` and `load_model` methods. Directly pickling the model object is not supported and may break.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'4.1.0':16 'annual':20 'attent':10 'attention-bas':9 'base':11 'classif':23,36 'current':14 'deep':32 'deep-learn':31 'googl':7 'implement':4 'learn':33 'network':13 'pre':28 'pre-train':27 'pytorch':1,3,34 'regress':24,37 'releas':21 'semi':19 'semi-annu':18 'support':22 'tabnet':2,6,35 'tabular':12,30 'train':29 'unsupervis':26 'version':15","created_at":"2026-05-01T08:13:16.431924+00:00","updated_at":"2026-05-01T08:13:16.431924+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'TabNetClassifier' from 'pytorch_tabnet' (unknown location)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"4.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/dreamquark-ai/tabnet","docs":"https://github.com/dreamquark-ai/tabnet","changelog":null,"pypi":"https://pypi.org/project/pytorch-tabnet/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}