As above, I keep getting the error ‘Target 2 is out of bounds’ when trying to train a MetaCAT model with 3 possible outputs. From this thread, IndexError: Target 2 is out of bounds - #12 by Vijaya_kumar - vision - PyTorch Forums, I believe it is to do with the input tensor being the wrong size but I’m struggling to debug it looking at the git hub code. This happens when using the model.train_raw and model.train_from_json functions. Any thoughts?
I think the issue is that the meta_cat_config.model.nclasses value is 2 while the number of of keys in meta_cat_config.general.category_value2id is 3.
So if you set meta_cat_config.model.nclasses = 3 this should be resolved.
Thanks, I’ll have a look. FYI the condensing of classes works with the BERT MetaCAT models, just not the LSTM ones. I’m trying to debug this at the moment as they share the same pipeline so it seems to be a model specific issue.