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 train with new dataset #22

Open
XAVILLA opened this issue Aug 30, 2021 · 1 comment
Open

How to train with new dataset #22

XAVILLA opened this issue Aug 30, 2021 · 1 comment

Comments

@XAVILLA
Copy link

XAVILLA commented Aug 30, 2021

Hi, I'm trying to use gen_train_eval_nopretrained.sh to train with a new dataset I implemented. However, in main.py there is this line of code
tree = Tree.create_from_args(args, classes=trainset.classes)
the error I got is FileNotFound at nbdt/hierarchies/mydataset/graph-induced.json
and it seems that this line of code requires generated hierarchy? But I can only generate hierarchy after I've trained the model. So I'm a bit confused on what to do.

@alvinwan
Copy link
Owner

@XAVILLA Ah, good question! Do you have a regular pre-trained model for that dataset? The most stable way to train is to:

  1. Train a regular model
  2. Generate a hierarchy from the trained regular model
  3. Train an NBDT model using this generated hierarchy

There are tidbits of code that will allow you to fine-tune in step 3 instead of retraining or skip steps 1+2, but they're not as stable, so I don't recommend.

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