You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @akarasman ,
I plan to reproduce your code, but when I run the sample command I get a first off error as below. Since I am not very familiar with the yolo model, I would like to ask you for advice.
Error:
$python3 explain.py --source=data/images/me.png --weights=yolov5s.pt --explain-class='person'
explain: weights=['yolov5s.pt'], source=data/images/me.png, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, visualize=False, update=False, project=runs/explain, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, power=1, contrastive=False, b1=1.0, b2=1.0, explain_class=person, conf=False, max_class_only=True, box_xywh=None, smooth_ks=1, box_xyxy=None, cmap=magma
YOLOv5 🚀 2022-8-1 torch 1.10.1+cu111 CUDA:0 (NVIDIA GeForce RTX 3070, 7971MiB)
Fusing layers...
Model Summary: 232 layers, 7459581 parameters, 0 gradients
Traceback (most recent call last):
File "/home/why/Desktop/LRP/inverter.py", line 199, in invert
return self.inv_funcs[type(layer)](self, layer, relevance, **kwargs)
KeyError: <class 'models.common.BottleneckCSP'>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "explain.py", line 391, in<module>
main(opt)
File "explain.py", line 387, in main
run(**vars(opt))
File "/home/why/anaconda3/envs/lrp/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "explain.py", line 282, in run
get_explanation(inn_model, init, contrastive, b1, b2, int(cls),
File "explain.py", line 54, in get_explanation
lrp_out = inn_model.innvestigate(in_tensor=None, initializer=init)
File "/home/why/Desktop/LRP/innvestigator.py", line 351, in innvestigate
relevance = self.inverter(layer, relevance)
File "/home/why/Desktop/LRP/inverter.py", line 206, in __call__
return self.invert(layer, relevance, **kwargs)
File "/home/why/Desktop/LRP/inverter.py", line 201, in invert
raise NotImplementedError(f'Relevance propagation not implemented for layer type {type(layer)}')
NotImplementedError: Relevance propagation not implemented for layer type<class 'models.common.BottleneckCSP'>
Hi @akarasman ,
I plan to reproduce your code, but when I run the sample command I get a first off error as below. Since I am not very familiar with the yolo model, I would like to ask you for advice.
Error:
And here's the list of dependencies
The text was updated successfully, but these errors were encountered: