-
Notifications
You must be signed in to change notification settings - Fork 3
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
IndexError: index out of range in self #13
Comments
you probably need to check the __get_item__ function in the dataloader. For instance, you maybe don't need Line 250 in 9abb083
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/ALDM/cldm_seg/util.py", line 41, in forward
seg_emb = torch.index_select(self.class_embeddings, 0, seg_map_.cpu())
IndexError: index out of range in self
I am using the structure of cityscapes.py for my new dataset, where I am using self.lb_map = {el['id']: el['trainId'] for el in labels_info}
I created a json file "newdataset_info.json" where I packed :
{
"name": "terrain",
"ignoreInEval": false,
"id": 30,
"color": [
112,
9,
255
],
"trainId": 30
}
for each class. Note that I put all my classes and I am not ignoring any of them (No trainId = 255).
When I run the code, I receive this error (See above).
However, I tried to add 3 fictive classes to the json file, named them randomly but put their trainId as 255, it worked. I dont understand what is the problem here? And I don't know if the way it made the program compile is true and does not affect the training?
The text was updated successfully, but these errors were encountered: