lxycopper / PLU

The implementation of PLU
Apache License 2.0
19 stars 0 forks source link

TypeError: forward() got an unexpected keyword argument 'x' #5

Open GitHubAaronhuang opened 3 months ago

GitHubAaronhuang commented 3 months ago

Traceback (most recent call last): File "/home/mrp/hyy/OWOD/PLU/detectron2/engine/train_loop.py", line 147, in train self.run_step() File "/home/mrp/hyy/OWOD/PLU/detectron2/engine/train_loop.py", line 317, in run_step loss_dict = self.model(data) File "/home/mrp/anaconda3/envs/OWOD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, kwargs) File "/home/mrp/anaconda3/envs/OWOD/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 799, in forward output = self.module(*inputs[0], *kwargs[0]) File "/home/mrp/anaconda3/envs/OWOD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/mrp/hyy/OWOD/PLU/detectron2/modeling/meta_arch/rcnn.py", line 178, in forward detector_losses = self.roi_heads(file_names,images, features, proposals, gt_instances, device=self.device) File "/home/mrp/anaconda3/envs/OWOD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/mrp/hyy/OWOD/PLU/detectron2/modeling/roi_heads/roi_heads.py", line 924, in forward proposals = self.label_and_sample_uda_proposals(file_names,images,proposals, targets, device) File "/home/mrp/hyy/OWOD/PLU/detectron2/modeling/roi_heads/roi_heads.py", line 744, in label_and_sample_uda_proposals sampled_idxs, gt_classes = self._sample_uda_proposals(file_names,per_image, gt_boxes_per_image, proposals_per_image, File "/home/mrp/hyy/OWOD/PLU/detectron2/modeling/roi_heads/roi_heads.py", line 570, in _sample_uda_proposals cls_out, cls_logits = self.uda_heads(x = eval_img, source_cls_labels = None, t_weak=None, t_strong=None) File "/home/mrp/anaconda3/envs/OWOD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, **kwargs) TypeError: forward() got an unexpected keyword argument 'x'

Dear Author, I encountered an issue. Could you please advise on how to improve it?