jiazhou-garland / EventBind

[ECCV 2024] Official implementation of the paper "EventBind: Learning a Unified Representation to Bind Them All for Event-based Open-world Understanding".
MIT License
24 stars 0 forks source link

Run problems #5

Closed bollossom closed 2 months ago

bollossom commented 2 months ago

excuseme, Is there a problem with the model input code? Traceback (most recent call last): File "/EventBind/train_dp_N-Caltech101.py", line 444, in main(cfg) File "/EventBind/train_dp_N-Caltech101.py", line 396, in main epoch_loss = train_one_epoch(EventCLIP, cfg, loss_scaler, optimizer, lr_sched, train_loader, epoch) File "/EventBind/train_dp_N-Caltech101.py", line 33, in train_one_epoch = model(events, images, labels, real_num_frame)

RuntimeError: forward() expected at most 3 argument(s) but received 5 argument(s). Declaration: forward(torch.multimodal.model.multimodal_transformer.Multimodal self, Tensor image, Tensor input) -> ((Tensor, Tensor))

jiazhou-garland commented 2 months ago

Hello, please provide your configuration information and full error information.

The error comes from the number of model inputs, which is defined in EventBind/model/EventCLIP.py line 47

def forward(self, events, image, class_idxs, real_num_frame):

It seems to be no problem for the original code which defined 5 inputs.

bollossom commented 2 months ago

I have solved the problem, thank you. Have a nice day!!!