MaverickRen / PixelLM

PixelLM is an effective and efficient LMM for pixel-level reasoning and understanding. PixelLM is accepted by CVPR 2024.
Apache License 2.0
177 stars 5 forks source link

AssertionError in assert end_i <= len(targets), (targets.shape, batch_seg_token_count) during training #16

Open GaoXiaoshan opened 5 months ago

GaoXiaoshan commented 5 months ago

Thank you for making the great work open source.

But I met AssertionError in assert end_i <= len(targets), (targets.shape, batch_seg_token_count) during training The details are below: File "./PixelLM/model/PixelLM.py", line 600, in model_forward overlap_loss(pred_mask, gt_mask, gt_mask.shape[0], batch_seg_token_count) File "./PixelLM/model/PixelLM.py", line 79, in overlap_loss assert end_i <= len(targets), (targets.shape, batch_seg_token_count) AssertionError: (torch.Size([9, 500, 375]), tensor([ 0, 12, 24, 36], device='cuda:0'))

Looking forward to your solves.

MaverickRen commented 5 months ago

Sorry, there may be problems with the overlap_loss part of the code when I organize the code. You can cancel overlap_loss during training first. This still works well.

GaoXiaoshan commented 4 months ago

Thanks for your reply. I also met the error as issue#6 in the github even with update code. https://github.com/MaverickRen/PixelLM/issues/6 Is there any new update?

Looking forward to hearing from you.

Zhongwei Ren @.***> 于2024年4月27日周六 20:01写道:

Sorry, there may be problems with the overlap_loss part of the code when I organize the code. You can cancel overlap_loss during training first. This still works well.

— Reply to this email directly, view it on GitHub https://github.com/MaverickRen/PixelLM/issues/16#issuecomment-2080484292, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3TA3OHWRIZPNGFJ4UM2STY7OHQHAVCNFSM6AAAAABGYV2HQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBQGQ4DIMRZGI . You are receiving this because you authored the thread.Message ID: @.***>

ShunLu91 commented 3 months ago

Same problem, too.

zhixuanli commented 3 weeks ago

Same problem, and cannot train